aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-09-16 01:34:45 -0400
committerGitHub <noreply@github.com>2017-09-16 01:34:45 -0400
commit43946902504c1aa5c1217e3fe802697566db4c03 (patch)
treea10c09b74f42ef69b1c5a72f947040dd0b3d03a2 /app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt
parent33ca5b2762e0dca515a54a715845ce816215de7a (diff)
downloadfrost-43946902504c1aa5c1217e3fe802697566db4c03.tar.gz
frost-43946902504c1aa5c1217e3fe802697566db4c03.tar.bz2
frost-43946902504c1aa5c1217e3fe802697566db4c03.zip
Feature/recents (#290)
* Create toggle for aggressive recents * Add toggle
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt10
1 files changed, 1 insertions, 9 deletions
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,