Save images to download location by default
This commit is contained in:
1 parent
66fbc7e821
commit
462e0257a9
7 files changed
+29
-1
No files matched your search
@@ -422,7 +422,7 @@ class ReaderActivity : EhActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun saveImage(page: Int) {
|
||||
fun saveImage(page: Int) {
|
||||
if (null == mGalleryProvider) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ class ReaderPageSheet(
|
||||
|
||||
binding.share.setOnClickListener { share() }
|
||||
binding.save.setOnClickListener { save() }
|
||||
binding.saveTo.setOnClickListener { saveTo() }
|
||||
|
||||
return binding.root
|
||||
}
|
||||
@@ -37,6 +38,14 @@ class ReaderPageSheet(
|
||||
* Saves the image of this page on external storage.
|
||||
*/
|
||||
private fun save() {
|
||||
activity.saveImage(page.index)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the image of this page to a custom location on external storage.
|
||||
*/
|
||||
private fun saveTo() {
|
||||
activity.saveImageTo(page.index)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
@@ -35,4 +35,19 @@
|
||||
app:drawableStartCompat="@drawable/ic_save_24dp"
|
||||
app:drawableTint="?attr/colorOnBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/save_to"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:drawablePadding="32dp"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:text="@string/action_save_to"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:drawableStartCompat="@drawable/ic_save_24dp"
|
||||
app:drawableTint="?attr/colorOnBackground" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -590,6 +590,7 @@
|
||||
<string name="action_retry">重试</string>
|
||||
<string name="action_share">分享</string>
|
||||
<string name="action_save">保存</string>
|
||||
<string name="action_save_to">保存到…</string>
|
||||
<string name="pref_category_general">通用</string>
|
||||
<string name="pref_fullscreen">全屏</string>
|
||||
<string name="pref_page_transitions">页面过渡动画</string>
|
||||
|
||||
@@ -522,6 +522,7 @@
|
||||
<string name="action_retry">重試</string>
|
||||
<string name="action_share">分享</string>
|
||||
<string name="action_save">儲存</string>
|
||||
<string name="action_save_to">儲存到…</string>
|
||||
<string name="pref_category_general">一般</string>
|
||||
<string name="pref_fullscreen">全螢幕</string>
|
||||
<string name="pref_show_page_number">顯示頁碼</string>
|
||||
|
||||
@@ -584,6 +584,7 @@
|
||||
<string name="action_retry">重試</string>
|
||||
<string name="action_share">分享</string>
|
||||
<string name="action_save">儲存</string>
|
||||
<string name="action_save_to">儲存到…</string>
|
||||
<string name="pref_category_general">一般</string>
|
||||
<string name="pref_fullscreen">全螢幕</string>
|
||||
<string name="pref_show_page_number">顯示頁碼</string>
|
||||
|
||||
@@ -733,6 +733,7 @@
|
||||
<string name="custom_filter">Custom filter</string>
|
||||
<string name="action_share">Share</string>
|
||||
<string name="action_save">Save</string>
|
||||
<string name="action_save_to">Save to…</string>
|
||||
<string name="pref_category_for_this_series">For this series</string>
|
||||
<!-- Tachiyomi Reader End-->
|
||||
</resources>
|
||||
Reference in new issue
Block a user