mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-30 13:01:02 +00:00
feat(social): only save last 100 activity ids
This commit is contained in:
@@ -42,7 +42,7 @@ class StatusActivity : AppCompatActivity(), StoriesCallback {
|
||||
slideOutLeft = AnimationUtils.loadAnimation(this, R.anim.slide_out_left)
|
||||
slideInRight = AnimationUtils.loadAnimation(this, R.anim.slide_in_right)
|
||||
|
||||
val watchedActivity = PrefManager.getCustomVal<Set<Int>>("${activity[position].id}_activities", setOf())
|
||||
val watchedActivity = PrefManager.getCustomVal<Set<Int>>("activities", setOf())
|
||||
val startFrom = findFirstNonMatch(watchedActivity, activity[position].activity )
|
||||
val startIndex = if ( startFrom > 0) startFrom else 0
|
||||
binding.stories.setStoriesList(activity[position].activity, this, startIndex + 1)
|
||||
@@ -77,7 +77,7 @@ class StatusActivity : AppCompatActivity(), StoriesCallback {
|
||||
override fun onStoriesEnd() {
|
||||
position += 1
|
||||
if (position < activity.size - 1) {
|
||||
val watchedActivity = PrefManager.getCustomVal<Set<Int>>("${activity[position].id}_activities", setOf())
|
||||
val watchedActivity = PrefManager.getCustomVal<Set<Int>>("activities", setOf())
|
||||
val startFrom = findFirstNonMatch(watchedActivity, activity[position].activity )
|
||||
val startIndex= if ( startFrom > 0) startFrom else 0
|
||||
binding.stories.startAnimation(slideOutLeft)
|
||||
@@ -91,7 +91,7 @@ class StatusActivity : AppCompatActivity(), StoriesCallback {
|
||||
override fun onStoriesStart() {
|
||||
position -= 1
|
||||
if (position >= 0) {
|
||||
val watchedActivity = PrefManager.getCustomVal<Set<Int>>("${activity[position].id}_activities", setOf())
|
||||
val watchedActivity = PrefManager.getCustomVal<Set<Int>>("activities", setOf())
|
||||
val startFrom = findFirstNonMatch(watchedActivity, activity[position].activity )
|
||||
val startIndex = if ( startFrom > 0) startFrom else 0
|
||||
binding.stories.startAnimation(slideOutRight)
|
||||
|
||||
Reference in New Issue
Block a user