mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-03-15 02:40:18 +01:00
Added empty import file toast
This commit is contained in:
parent
3e4c5de826
commit
af9ab19185
@ -309,7 +309,12 @@ class SettingsActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
val recentsType = object : TypeToken<List<RecentCall>>() {}.type
|
||||
val objects = Gson().fromJson<List<RecentCall>>(jsonString, recentsType)
|
||||
val objects = Gson().fromJson<List<RecentCall>>(jsonString, recentsType).orEmpty()
|
||||
|
||||
if (objects.isEmpty()) {
|
||||
toast(R.string.no_entries_for_importing)
|
||||
return
|
||||
}
|
||||
|
||||
RecentsHelper(this).restoreRecentCalls(this, objects) {
|
||||
toast(R.string.importing_successful)
|
||||
|
Loading…
x
Reference in New Issue
Block a user