Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3300ddb authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

AM: show toast after re-OAuth to notify update

parent 7097c598
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package foundation.e.accountmanager.ui.setup

import android.accounts.Account
import android.os.Bundle
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.compose.setContent
@@ -27,6 +28,7 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.platform.LocalContext
import androidx.core.app.NotificationManagerCompat
import androidx.hilt.navigation.compose.hiltViewModel
import at.bitfire.davdroid.R
import at.bitfire.davdroid.push.PushNotificationManager
import at.bitfire.davdroid.sync.SyncDataType
import at.bitfire.davdroid.ui.AppTheme
@@ -87,6 +89,12 @@ fun OAuthHandlerScreen(
                val notificationId = PushNotificationManager.notificationId(account, dataType)
                notificationManager.cancel(notificationId)
            }

            Toast.makeText(
                context,
                context.getString(R.string.account_updated_toast),
                Toast.LENGTH_SHORT
            ).show()
        } else {
            model.authCodeFailed()
        }
+1 −0
Original line number Diff line number Diff line
@@ -36,4 +36,5 @@
    <string name="legacy_murena_login">Legacy Murena.io</string>

    <string name="sync_error_authentication_oauth">Authentication issue. Tap to sign in again</string>
    <string name="account_updated_toast">Account updated successfully</string>
</resources>