aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt28
-rw-r--r--app/src/main/res/xml/frost_changelog.xml2
-rw-r--r--docs/Changelog.md3
3 files changed, 20 insertions, 13 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 fd2b6cc1..f0bf2efa 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt
@@ -30,18 +30,22 @@ class WebFragment : Fragment() {
const val REQUEST_TEXT_ZOOM = 17
const val REQUEST_REFRESH = 99
- operator fun invoke(data: FbItem, position: Int) = WebFragment().withArguments(
- ARG_URL to data.url,
- ARG_POSITION to position,
- ARG_URL_ENUM to 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
- })
+ 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
+ }
+ withArguments(
+ ARG_URL to d.url,
+ ARG_POSITION to position,
+ ARG_URL_ENUM to d
+ )
+ }
}
// val refresh: SwipeRefreshLayout by lazy { frostWebView.refresh }
diff --git a/app/src/main/res/xml/frost_changelog.xml b/app/src/main/res/xml/frost_changelog.xml
index 422fae19..716c2bbf 100644
--- a/app/src/main/res/xml/frost_changelog.xml
+++ b/app/src/main/res/xml/frost_changelog.xml
@@ -12,7 +12,7 @@
<version title="Beta Updates"/>
<item text="Prevent image loading from trimming too many characters" />
- <item text="" />
+ <item text="Fix most recent mode for news feed" />
<item text="" />
<item text="" />
<item text="" />
diff --git a/docs/Changelog.md b/docs/Changelog.md
index 8d7f9a43..0711f97a 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -1,6 +1,9 @@
# Changelog
## Beta Updates
+* Prevent image loading from trimming too many characters
+
+## v1.4.12
* Fix new messages not showing
* Fix theme for sharing and new messages
* Prevent search bar settings from disabling itself if auto suggestions fail