Added an periodical backup to the telegram bot
This commit is contained in:
@@ -43,6 +43,7 @@ class AppSettings @Inject constructor(@ApplicationContext context: Context) {
|
|||||||
private val connectivityManager = context.connectivityManager
|
private val connectivityManager = context.connectivityManager
|
||||||
private val preferences: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
|
private val preferences: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
|
|
||||||
|
|
||||||
var telegramChatId: String?
|
var telegramChatId: String?
|
||||||
get() = preferences.getString("telegram_chat_id", null)
|
get() = preferences.getString("telegram_chat_id", null)
|
||||||
set(value) {
|
set(value) {
|
||||||
|
|||||||
@@ -194,3 +194,4 @@ class PeriodicalBackupSettingsFragment : BasePreferenceFragment(R.string.periodi
|
|||||||
return resolveFile(context)?.path ?: toString()
|
return resolveFile(context)?.path ?: toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -151,4 +151,3 @@ class PeriodicalBackupWorker @AssistedInject constructor(
|
|||||||
const val DATA_TIMESTAMP = "ts"
|
const val DATA_TIMESTAMP = "ts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,5 +43,4 @@
|
|||||||
android:defaultValue=""
|
android:defaultValue=""
|
||||||
android:summary="Enter the chat ID where backups should be sent" />
|
android:summary="Enter the chat ID where backups should be sent" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
||||||
|
|||||||
Reference in New Issue
Block a user