This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
John Oberhauser
committed
Jun 14, 2024
1 parent
3eec8c6
commit c779f56
Showing
3 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
core/accounts/src/main/kotlin/social/firefly/core/accounts/AccountsManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package social.firefly.core.accounts | ||
|
||
import kotlinx.coroutines.flow.Flow | ||
import social.firefly.core.accounts.dao.MastodonAccountsDao | ||
import social.firefly.core.accounts.model.MastodonAccount | ||
|
||
class AccountsManager( | ||
private val mastodonAccountsDao: MastodonAccountsDao, | ||
) { | ||
|
||
suspend fun getActiveAccount(): MastodonAccount = mastodonAccountsDao.getActiveAccount() | ||
|
||
fun getActiveAccountFlow(): Flow<MastodonAccount> = mastodonAccountsDao.getActiveAccountFlow() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters