Commit 6c3fe07 1 parent 502e590 commit 6c3fe07 Copy full SHA for 6c3fe07
File tree 4 files changed +7
-5
lines changed
app/src/main/java/com/infomaniak/mail
4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -116,12 +116,12 @@ object RealmDatabase {
116
116
// endregion
117
117
118
118
// region Reset Realms
119
- fun backUpPreviousRealms () {
119
+ fun backupPreviousRealms () {
120
120
oldUserInfo = WeakReference (_userInfo )
121
- backUpPreviousMailboxContent ()
121
+ backupPreviousMailboxContent ()
122
122
}
123
123
124
- fun backUpPreviousMailboxContent () {
124
+ fun backupPreviousMailboxContent () {
125
125
oldMailboxContent = WeakReference (_mailboxContent )
126
126
}
127
127
Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ class ThreadFragment : Fragment() {
198
198
}
199
199
200
200
private fun setupAdapter () = with (binding.messagesList) {
201
+
201
202
adapter = ThreadAdapter (
202
203
shouldLoadDistantResources = shouldLoadDistantResources(),
203
204
isCalendarEventExpandedMap = threadViewModel.isCalendarEventExpandedMap,
@@ -298,6 +299,7 @@ class ThreadFragment : Fragment() {
298
299
shouldIgnoreView = { view -> view.tag == ThreadAdapter .IGNORE_DIVIDER_TAG },
299
300
),
300
301
)
302
+
301
303
recycledViewPool.setMaxRecycledViews(0 , 0 )
302
304
threadAdapter.stateRestorationPolicy = StateRestorationPolicy .PREVENT_WHEN_EMPTY
303
305
}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class SwitchUserViewModel @Inject constructor(
47
47
fun switchAccount (user : User ) = viewModelScope.launch(ioDispatcher) {
48
48
if (user.id != AccountUtils .currentUserId) {
49
49
context.trackAccountEvent(" switch" )
50
- RealmDatabase .backUpPreviousRealms ()
50
+ RealmDatabase .backupPreviousRealms ()
51
51
AccountUtils .currentUser = user
52
52
AccountUtils .currentMailboxId = mailboxController.getFirstValidMailbox(user.id)?.mailboxId ? : AppSettings .DEFAULT_ID
53
53
AccountUtils .reloadApp?.invoke()
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ object AccountUtils : CredentialManager() {
81
81
var currentMailboxEmail: String? = null
82
82
83
83
suspend fun switchToMailbox (mailboxId : Int ) {
84
- RealmDatabase .backUpPreviousMailboxContent ()
84
+ RealmDatabase .backupPreviousMailboxContent ()
85
85
currentMailboxId = mailboxId
86
86
reloadApp?.invoke()
87
87
}
You can’t perform that action at this time.
0 commit comments