Add ComposeActivity tests. Add ServiceLocator (#542)
This commit is contained in:
parent
4e617dccc7
commit
28e46c9cc0
18 changed files with 337 additions and 154 deletions
|
|
@ -20,6 +20,7 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
|
||||
import com.keylesspalace.tusky.TuskyApplication
|
||||
import com.keylesspalace.tusky.db.AccountManager
|
||||
import com.keylesspalace.tusky.util.NotificationHelper
|
||||
|
||||
class NotificationClearBroadcastReceiver : BroadcastReceiver() {
|
||||
|
|
@ -27,7 +28,8 @@ class NotificationClearBroadcastReceiver : BroadcastReceiver() {
|
|||
|
||||
val accountId = intent.getLongExtra(NotificationHelper.ACCOUNT_ID, -1)
|
||||
|
||||
val accountManager = TuskyApplication.getAccountManager()
|
||||
val accountManager = TuskyApplication.getInstance(context)
|
||||
.serviceLocator.get(AccountManager::class.java)
|
||||
val account = accountManager.getAccountById(accountId)
|
||||
if (account != null) {
|
||||
account.activeNotifications = "[]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue