Remove the green badge on a pending invite after a first preview (#4532)
* Remove condition on displayType as I believe, that it has no effect. * Remove the green badge on a pending invite after a first preview * Update screenshots * Fix test * Improve DefaultSeenInvitesStore, clear it on logout, and on clear cache. Also create a store per session. * Remember the returned flow. --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
parent
77a7c0b2e5
commit
ef8eeb804e
26 changed files with 326 additions and 29 deletions
|
|
@ -11,6 +11,7 @@ import android.content.Context
|
|||
import coil3.SingletonImageLoader
|
||||
import com.squareup.anvil.annotations.ContributesBinding
|
||||
import io.element.android.features.ftue.api.state.FtueService
|
||||
import io.element.android.features.invite.api.SeenInvitesStore
|
||||
import io.element.android.features.preferences.impl.DefaultCacheService
|
||||
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
|
||||
import io.element.android.libraries.di.ApplicationContext
|
||||
|
|
@ -35,6 +36,7 @@ class DefaultClearCacheUseCase @Inject constructor(
|
|||
private val okHttpClient: Provider<OkHttpClient>,
|
||||
private val ftueService: FtueService,
|
||||
private val pushService: PushService,
|
||||
private val seenInvitesStore: SeenInvitesStore,
|
||||
) : ClearCacheUseCase {
|
||||
override suspend fun invoke() = withContext(coroutineDispatchers.io) {
|
||||
// Clear Matrix cache
|
||||
|
|
@ -50,6 +52,7 @@ class DefaultClearCacheUseCase @Inject constructor(
|
|||
context.cacheDir.deleteRecursively()
|
||||
// Clear some settings
|
||||
ftueService.reset()
|
||||
seenInvitesStore.clear()
|
||||
// Ensure any error will be displayed again
|
||||
pushService.setIgnoreRegistrationError(matrixClient.sessionId, false)
|
||||
// Ensure the app is restarted
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue