AccountFragment: Ask for confirmation before logout

Avoid user clicking the logout button accidentally

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-07-14 13:00:38 +07:00
parent add64582b2
commit ab39597296
4 changed files with 45 additions and 14 deletions

View File

@@ -94,14 +94,7 @@
android:id="@+id/accountFragment"
android:name="com.aurora.store.view.ui.account.AccountFragment"
android:label="@string/title_account_manager"
tools:layout="@layout/fragment_account" >
<action
android:id="@+id/action_accountFragment_to_splashFragment"
app:destination="@id/splashFragment"
app:launchSingleTop="true"
app:popUpTo="@id/mobile_navigation"
app:popUpToInclusive="true" />
</fragment>
tools:layout="@layout/fragment_account" />
<fragment
android:id="@+id/settingsFragment"
android:name="com.aurora.store.view.ui.preferences.SettingsFragment"
@@ -480,4 +473,15 @@
android:id="@+id/aboutDialog"
android:name="com.aurora.store.view.ui.about.AboutDialog"
android:label="@string/title_about" />
<dialog
android:id="@+id/logoutDialog"
android:name="com.aurora.store.view.ui.account.LogoutDialog"
android:label="@string/action_logout">
<action
android:id="@+id/action_logoutDialog_to_splashFragment"
app:destination="@id/splashFragment"
app:launchSingleTop="true"
app:popUpTo="@id/mobile_navigation"
app:popUpToInclusive="true" />
</dialog>
</navigation>

View File

@@ -467,4 +467,8 @@
<!-- ExportWorker -->
<string name="export_app_summary_success">Successfully exported app bundle</string>
<string name="export_app_summary_fail">Failed to exported app bundle</string>
<!-- LogoutDialog -->
<string name="action_logout_confirmation_title">Log out?</string>
<string name="action_logout_confirmation_message">Are you sure you want to log out?</string>
</resources>