PR remarks
This commit is contained in:
parent
a431d885f0
commit
c6593f0cee
|
@ -24,13 +24,13 @@ import javax.inject.Inject
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The purpose of this class is to provide an alternative and lightweight way to store settings/data
|
* The purpose of this class is to provide an alternative and lightweight way to store settings/data
|
||||||
* on the sdi without using the database. This should be used just for sdk/user preferences and
|
* on the sdk without using the database. This should be used just for sdk/user preferences and
|
||||||
* not for large data sets
|
* not for large data sets
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LightweightSettingsStorage @Inject constructor(
|
class LightweightSettingsStorage @Inject constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
val matrixConfiguration: MatrixConfiguration
|
private val matrixConfiguration: MatrixConfiguration
|
||||||
) {
|
) {
|
||||||
|
|
||||||
private val sdkDefaultPrefs = PreferenceManager.getDefaultSharedPreferences(context.applicationContext)
|
private val sdkDefaultPrefs = PreferenceManager.getDefaultSharedPreferences(context.applicationContext)
|
||||||
|
|
|
@ -90,7 +90,7 @@ import javax.inject.Inject
|
||||||
data class HomeActivityArgs(
|
data class HomeActivityArgs(
|
||||||
val clearNotification: Boolean,
|
val clearNotification: Boolean,
|
||||||
val accountCreation: Boolean,
|
val accountCreation: Boolean,
|
||||||
val existingSession: Boolean = false,
|
val hasExistingSession: Boolean = false,
|
||||||
val inviteNotificationRoomId: String? = null
|
val inviteNotificationRoomId: String? = null
|
||||||
) : Parcelable
|
) : Parcelable
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ class HomeActivity :
|
||||||
if (checkSession) {
|
if (checkSession) {
|
||||||
// We should check session to ensure we will only clear cache if needed
|
// We should check session to ensure we will only clear cache if needed
|
||||||
val args = intent.getParcelableExtra<HomeActivityArgs>(Mavericks.KEY_ARG)
|
val args = intent.getParcelableExtra<HomeActivityArgs>(Mavericks.KEY_ARG)
|
||||||
if (args?.existingSession == true) {
|
if (args?.hasExistingSession == true) {
|
||||||
// existingSession --> Will be true only if we came from an existing active session
|
// existingSession --> Will be true only if we came from an existing active session
|
||||||
Timber.i("----> Migrating threads from an existing session..")
|
Timber.i("----> Migrating threads from an existing session..")
|
||||||
handleThreadsMigration()
|
handleThreadsMigration()
|
||||||
|
@ -597,7 +597,7 @@ class HomeActivity :
|
||||||
val args = HomeActivityArgs(
|
val args = HomeActivityArgs(
|
||||||
clearNotification = clearNotification,
|
clearNotification = clearNotification,
|
||||||
accountCreation = accountCreation,
|
accountCreation = accountCreation,
|
||||||
existingSession = existingSession,
|
hasExistingSession = existingSession,
|
||||||
inviteNotificationRoomId = inviteNotificationRoomId
|
inviteNotificationRoomId = inviteNotificationRoomId
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue