Added an periodical backup to the telegram bot

master
Mac135135 2 years ago
parent 27d7a6a8cb
commit 49d29ae675

@ -43,6 +43,7 @@ class AppSettings @Inject constructor(@ApplicationContext context: Context) {
private val connectivityManager = context.connectivityManager
private val preferences: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
var telegramChatId: String?
get() = preferences.getString("telegram_chat_id", null)
set(value) {

@ -194,3 +194,4 @@ class PeriodicalBackupSettingsFragment : BasePreferenceFragment(R.string.periodi
return resolveFile(context)?.path ?: toString()
}
}

@ -151,4 +151,3 @@ class PeriodicalBackupWorker @AssistedInject constructor(
const val DATA_TIMESTAMP = "ts"
}
}

@ -43,5 +43,4 @@
android:defaultValue=""
android:summary="Enter the chat ID where backups should be sent" />
</androidx.preference.PreferenceScreen>

Loading…
Cancel
Save