Skip to content

Commit 888dc1f

Browse files
linking account deletion repo
1 parent d34ce45 commit 888dc1f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/src/main/java/com/getcode/manager/AuthManager.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ class AuthManager @Inject constructor(
132132
.ignoreElement()
133133
}
134134

135+
fun deleteAndLogout(activity: Activity, onComplete: () -> Unit = {}) {
136+
//todo: add account deletion
137+
logout(activity, onComplete)
138+
}
139+
135140
fun logout(activity: Activity, onComplete: () -> Unit = {}) {
136141
AccountUtils.removeAccounts(activity)
137142
.doOnSuccess { res: Boolean ->

app/src/main/java/com/getcode/view/main/account/DeleteAccountViewModel.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class DeleteAccountViewModel @Inject constructor(
2222
fun isDeletionAllowed() = typedText.value.equals(requiredPhrase, ignoreCase = true)
2323

2424
fun onConfirmDelete(activity: Activity) {
25-
//todo: delete account
26-
authManager.logout(activity)
25+
authManager.deleteAndLogout(activity)
2726
}
2827
}

0 commit comments

Comments
 (0)