Display a toast after restoring a backup. Seems like useful feedback. (#1531)

This commit is contained in:
Eran Leshem 2025-05-14 17:23:39 +03:00 committed by GitHub
parent 95d4bfe97c
commit c4386df186
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -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)