Added setting to enable/disable the mark on swipe.
This commit is contained in:
parent
297f797b97
commit
9458b1834b
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
- Toolbar in reader activity.
|
- Toolbar in reader activity.
|
||||||
|
|
||||||
|
- Marking items as read on scroll (with settings to enable/disable).
|
||||||
|
|
||||||
**1.5.4.22**
|
**1.5.4.22**
|
||||||
|
|
||||||
- You can now scroll through the loaded articles !
|
- You can now scroll through the loaded articles !
|
||||||
|
@ -41,6 +41,7 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
val debugReadingItems = sharedPref.getBoolean("read_debug", false)
|
val debugReadingItems = sharedPref.getBoolean("read_debug", false)
|
||||||
val userIdentifier = sharedPref.getString("unique_id", "")
|
val userIdentifier = sharedPref.getString("unique_id", "")
|
||||||
|
val markOnScroll = sharedPref.getBoolean("mark_on_scroll", false)
|
||||||
|
|
||||||
val api = SelfossApi(
|
val api = SelfossApi(
|
||||||
this,
|
this,
|
||||||
@ -59,6 +60,7 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
pager.setPageTransformer(true, DepthPageTransformer())
|
pager.setPageTransformer(true, DepthPageTransformer())
|
||||||
(indicator as CircleIndicator).setViewPager(pager)
|
(indicator as CircleIndicator).setViewPager(pager)
|
||||||
|
|
||||||
|
if (markOnScroll) {
|
||||||
pager.addOnPageChangeListener(object : ViewPager.SimpleOnPageChangeListener() {
|
pager.addOnPageChangeListener(object : ViewPager.SimpleOnPageChangeListener() {
|
||||||
var isLastItem = false
|
var isLastItem = false
|
||||||
|
|
||||||
@ -101,8 +103,7 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
@ -161,4 +161,5 @@
|
|||||||
<string name="reader_action_more">Read more</string>
|
<string name="reader_action_more">Read more</string>
|
||||||
<string name="reader_action_open">Open in browser</string>
|
<string name="reader_action_open">Open in browser</string>
|
||||||
<string name="reader_action_share">Share</string>
|
<string name="reader_action_share">Share</string>
|
||||||
|
<string name="pref_switch_actions_pager_scroll">Mark articles as read when scrolling between articles.</string>
|
||||||
</resources>
|
</resources>
|
@ -81,5 +81,9 @@
|
|||||||
android:summaryOff="@string/pref_switch_actions_tap_off"
|
android:summaryOff="@string/pref_switch_actions_tap_off"
|
||||||
android:summaryOn="@string/pref_switch_actions_tap_on"
|
android:summaryOn="@string/pref_switch_actions_tap_on"
|
||||||
android:title="@string/pref_switch_actions_tap_title" />
|
android:title="@string/pref_switch_actions_tap_title" />
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="mark_on_scroll"
|
||||||
|
android:title="@string/pref_switch_actions_pager_scroll" />
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
Loading…
Reference in New Issue
Block a user