File tree Expand file tree Collapse file tree
library/src/main/java/io/fusionauth/mobilesdk/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import androidx.datastore.preferences.preferencesDataStore
1111import kotlinx.coroutines.flow.catch
1212import kotlinx.coroutines.flow.first
1313import kotlinx.coroutines.flow.map
14- import java.io.IOException
1514
1615// Define the DataStore instance as an extension on Context.
1716// The name "_fusionauth_mobile_sdk" is the file name where preferences will be stored.
@@ -36,12 +35,8 @@ class DataStoreStorage(private val context: Context) : Storage {
3635 val prefKey = stringPreferencesKey(key)
3736 return context.dataStore.data
3837 .catch { exception ->
39- if (exception is IOException ) {
40- Log .e(TAG , " Error reading from DataStore: " + exception.message)
41- emit(emptyPreferences())
42- } else {
43- throw exception
44- }
38+ Log .e(TAG , " Error reading from DataStore" )
39+ emit(emptyPreferences())
4540 }
4641 .map { preferences ->
4742 preferences[prefKey]
You can’t perform that action at this time.
0 commit comments