mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Fix backup and restore prefs title and dead code
This commit is contained in:
parent
349f353146
commit
efc2f7d5e3
@ -8,6 +8,7 @@ import androidx.activity.result.contract.ActivityResultContracts.CreateDocument
|
||||
import androidx.preference.Preference
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.obj.BackupFile
|
||||
import com.github.libretube.ui.activities.SettingsActivity
|
||||
import com.github.libretube.ui.base.BasePreferenceFragment
|
||||
import com.github.libretube.ui.dialogs.BackupDialog
|
||||
import com.github.libretube.util.BackupHelper
|
||||
@ -76,6 +77,9 @@ class BackupRestoreSettings : BasePreferenceFragment() {
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
setPreferencesFromResource(R.xml.import_export_settings, rootKey)
|
||||
|
||||
val settingsActivity = activity as? SettingsActivity
|
||||
settingsActivity?.changeTopBarText(getString(R.string.backup_restore))
|
||||
|
||||
val importSubscriptions = findPreference<Preference>("import_subscriptions")
|
||||
importSubscriptions?.setOnPreferenceClickListener {
|
||||
getSubscriptionsFile.launch("*/*")
|
||||
|
@ -56,19 +56,4 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory app:title="@string/restore">
|
||||
|
||||
<Preference
|
||||
android:icon="@drawable/ic_download_filled"
|
||||
android:summary="@string/import_from_yt_summary"
|
||||
app:key="import_from_yt"
|
||||
app:title="@string/import_from_yt" />
|
||||
|
||||
<Preference
|
||||
android:icon="@drawable/ic_upload"
|
||||
app:key="export_subs"
|
||||
app:title="@string/export_subscriptions" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user