mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-10 00:27:45 +00:00
Display a toast after restoring a backup. Seems like useful feedback. (#1531)
This commit is contained in:
parent
95d4bfe97c
commit
c4386df186
2 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,8 @@ package helium314.keyboard.settings.preferences
|
|||
|
||||
import android.content.Intent
|
||||
import android.content.SharedPreferences
|
||||
import android.os.Looper
|
||||
import android.widget.Toast
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
|
@ -151,6 +153,9 @@ fun BackupRestorePreference(setting: Setting) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Looper.prepare()
|
||||
Toast.makeText(ctx, ctx.getString(R.string.backup_restored), Toast.LENGTH_LONG).show()
|
||||
} catch (t: Throwable) {
|
||||
error = "r" + t.message
|
||||
Log.w("AdvancedScreen", "error during restore", t)
|
||||
|
|
|
@ -196,6 +196,8 @@
|
|||
<string name="button_backup">Backup</string>
|
||||
<!-- restore button -->
|
||||
<string name="button_restore">Restore</string>
|
||||
<!-- Message when backup is restored successfully -->
|
||||
<string name="backup_restored">Backup restored</string>
|
||||
<!-- Preferences item for format for timestamp keycode -->
|
||||
<string name="timestamp_format_title">Format for timestamp key</string>
|
||||
<!-- Preferences item for choosing secondary language -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue