Fixed minor bugs

This commit is contained in:
archroid 2022-03-17 22:40:18 +03:30
parent fbdad7ee8d
commit ca6196da54
3 changed files with 21 additions and 15 deletions

View File

@ -40,8 +40,9 @@ class Settings : PreferenceFragmentCompat() {
override fun onCreate(savedInstanceState: Bundle?) {
getContent = registerForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri ->
getContent = registerForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri? ->
if(uri != null){
var zipfile = ZipFile(UriUtils.uri2File(uri))
var zipentry =
@ -64,6 +65,10 @@ class Settings : PreferenceFragmentCompat() {
Log.d(TAG, "subscribed: " + text +" total: " + subscribedCount)
}
}
Toast.makeText(context, "Subscribed to " + subscribedCount + " channels.", Toast.LENGTH_SHORT).show()
}
}
super.onCreate(savedInstanceState)
}

View File

@ -29,6 +29,6 @@
<string name="downloadfailed">Download Failed!</string>
<string name="vlc">Open in VLC</string>
<string name="vlcerror">Can\'t open in VLC. Maybe it\'s not installed yet?</string>
<string name="import_from_yt">Import subscriptions data from youtube</string>
<string name="import_from_yt">Import subscriptions from youtube</string>
</resources>

View File

@ -33,6 +33,7 @@
<androidx.preference.Preference
app:key="import_from_yt"
app:title="@string/import_from_yt"
android:hint="This is my hint"
/>
</androidx.preference.PreferenceScreen>