aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt
index 265cfbe5..4df99878 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt
@@ -32,7 +32,8 @@ enum class FbItem(
@StringRes val titleId: Int,
val icon: IIcon,
relativeUrl: String,
- val fragmentCreator: () -> BaseFragment = ::WebFragment
+ val fragmentCreator: () -> BaseFragment = ::WebFragment,
+ prefix: String = FB_URL_BASE
) : EnumBundle<FbItem> {
ACTIVITY_LOG(R.string.activity_log, GoogleMaterial.Icon.gmd_list, "me/allactivity"),
@@ -57,11 +58,16 @@ enum class FbItem(
/**
* Note that this url only works if a query (?q=) is provided
*/
- _SEARCH(R.string.kau_search, GoogleMaterial.Icon.gmd_search, "search/top"),
+ _SEARCH(
+ R.string.kau_search,
+ GoogleMaterial.Icon.gmd_search,
+ "search/top",
+ prefix = FB_URL_MBASIC_BASE
+ ),
SETTINGS(R.string.settings, GoogleMaterial.Icon.gmd_settings, "settings"),
;
- val url = "$FB_URL_BASE$relativeUrl"
+ val url = "$prefix$relativeUrl"
val isFeed: Boolean
get() = when (this) {