Skip to content

Commit

Permalink
Update to Ivy Cloud shutdown UI
Browse files Browse the repository at this point in the history
  • Loading branch information
ILIYANGERMANOV committed Jan 24, 2023
1 parent e85990f commit 2b33d0e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
10 changes: 4 additions & 6 deletions app/src/main/java/com/ivy/wallet/io/network/IvySession.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class IvySession(
private var authToken: String? = null

fun loadFromCache() {
userId = sharedPrefs.getString(SharedPrefs.SESSION_USER_ID, null)
?.let { UUID.fromString(it) }
authToken = sharedPrefs.getString(SharedPrefs.SESSION_AUTH_TOKEN, null)
// userId = sharedPrefs.getString(SharedPrefs.SESSION_USER_ID, null)
// ?.let { UUID.fromString(it) }
// authToken = sharedPrefs.getString(SharedPrefs.SESSION_AUTH_TOKEN, null)
}

fun getSessionToken() = authToken ?: throw NoSessionException()
Expand All @@ -24,9 +24,7 @@ class IvySession(

fun getUserIdSafe(): UUID? = userId

fun isLoggedIn(): Boolean {
return userId != null && authToken != null
}
fun isLoggedIn(): Boolean = false

suspend fun initiate(authResponse: AuthResponse) {
val user = authResponse.user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ private fun LocalAccountExplanation() {
Text(
modifier = Modifier.padding(start = 32.dp, end = 32.dp),
text = "Your data will be saved only locally on your phone. " +
"You risk losing your data if your uninstall the app or change your device. " +
"You risk losing your data if you uninstall the app or change your device. " +
"To prevent data loss, we recommend exporting backup from settings regularly.",
style = UI.typo.c.style(
color = Gray,
Expand Down
21 changes: 0 additions & 21 deletions app/src/main/java/com/ivy/wallet/ui/settings/SettingsScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -234,27 +234,6 @@ private fun BoxWithConstraintsScope.UI(
// Premium()
}

item {
SettingsSectionDivider(text = "Sync (temporary)")

Spacer(Modifier.height(16.dp))

FetchMissingTransactionsButton(
opFetchTrns = opFetchTrns,
onFetchMissingTransactions = onFetchMissingTransactions
)

Spacer(Modifier.height(16.dp))

SettingsPrimaryButton(
icon = R.drawable.ic_vue_security_shield_person,
text = "Login to restore old data (use before 2023!)",
textColor = UI.colors.pureInverse,
) {
onLogin()
}
}

item {
SettingsSectionDivider(text = stringResource(R.string.import_export))

Expand Down

0 comments on commit 2b33d0e

Please sign in to comment.