Clear corrupted db: add some logs

This commit is contained in:
ganfra 2019-10-04 19:42:27 +02:00
parent b5c6c1af0d
commit abbc62dd35

View file

@ -41,6 +41,10 @@ internal class SessionRealmConfigurationFactory @Inject constructor(private val
fun create(directory: File, userMd5: String): RealmConfiguration {
val shouldClearRealm = sharedPreferences.getBoolean("$REALM_SHOULD_CLEAR_FLAG_$userMd5", false)
if (shouldClearRealm) {
Timber.v("************************************************************")
Timber.v("The realm file session was corrupted and couldn't be loaded. ")
Timber.v("The file has been deleted to recover. ")
Timber.v("************************************************************")
directory.deleteRecursively()
}
sharedPreferences