Browse Source

always start with downloads when picking dir because otherwise there's no way to go back to internal or external

Andrew Dolgov 3 months ago
parent
commit
31616c82eb

+ 2 - 2
org.fox.ttcomics/src/main/AndroidManifest.xml

@@ -1,8 +1,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     package="org.fox.ttcomics2"
-    android:versionCode="87"
-    android:versionName="1.45" >
+    android:versionCode="88"
+    android:versionName="1.46" >
 
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.INTERNET" />

+ 1 - 5
org.fox.ttcomics/src/main/java/org/fox/ttcomics2/PreferencesActivity.java

@@ -64,11 +64,7 @@ public class PreferencesActivity extends CommonActivity {
     public void startPicker(String initialDir) {
         Intent intent = new Intent(PreferencesActivity.this, DirectoryChooserActivity.class);
 
-        SharedPreferences prefs = PreferenceManager
-                .getDefaultSharedPreferences(getApplicationContext());
-
-        if (initialDir == null) initialDir = prefs.getString("comics_directory",
-                Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath());
+        if (initialDir == null) initialDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
 
         intent.putExtra(DirectoryChooserActivity.EXTRA_CONFIG, DirectoryChooserConfig.builder()
                 .newDirectoryName("Comics")

+ 1 - 0
org.fox.ttcomics/src/main/res/xml/preferences.xml

@@ -8,6 +8,7 @@
             android:summary="@string/prefs_comics_directory_summary"
             android:title="@string/prefs_comics_directory" >
         </Preference>
+
         <Preference
             android:key="open_storage_dir"
             android:summary="@string/prefs_open_storage_dir_summary"