From 43946902504c1aa5c1217e3fe802697566db4c03 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 16 Sep 2017 01:34:45 -0400 Subject: Feature/recents (#290) * Create toggle for aggressive recents * Add toggle --- .../main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/fragments') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt index f0bf2efa..4286be86 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt @@ -31,15 +31,7 @@ class WebFragment : Fragment() { const val REQUEST_REFRESH = 99 operator fun invoke(data: FbItem, position: Int) = WebFragment().apply { - val d = when (data) { - //If is feed, check if sorting method is specified - FbItem.FEED -> when (FeedSort(Prefs.feedSort)) { - FeedSort.DEFAULT -> data - FeedSort.MOST_RECENT -> FbItem.FEED_MOST_RECENT - FeedSort.TOP -> FbItem.FEED_TOP_STORIES - } - else -> data - } + val d = if (data == FbItem.FEED) FeedSort(Prefs.feedSort).item else data withArguments( ARG_URL to d.url, ARG_POSITION to position, -- cgit v1.2.3