mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-29 04:17:12 +01:00
Added link to wiki in subreddit
Subreddit details menu now has a link to its wiki. Subs without a wiki will show the "this subreddit has no wiki" page.
This commit is contained in:
parent
2d5829830e
commit
0ca6bc25af
@ -1180,6 +1180,12 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
Toast.makeText(this, R.string.no_app, Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, R.string.no_app, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
} else if (itemId == R.id.action_go_to_wiki_activity ) {
|
||||||
|
Intent wikiIntent = new Intent(this, WikiActivity.class);
|
||||||
|
wikiIntent.putExtra(WikiActivity.EXTRA_SUBREDDIT_NAME, subredditName);
|
||||||
|
wikiIntent.putExtra(WikiActivity.EXTRA_WIKI_PATH, "index");
|
||||||
|
startActivity(wikiIntent);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -58,4 +58,10 @@
|
|||||||
android:orderInCategory="9"
|
android:orderInCategory="9"
|
||||||
android:title="@string/action_share"
|
android:title="@string/action_share"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_go_to_wiki_activity"
|
||||||
|
android:orderInCategory="10"
|
||||||
|
android:title="@string/action_go_to_wiki"
|
||||||
|
app:showAsAction="never" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -1190,5 +1190,6 @@
|
|||||||
<string name="app_lock_timeout_6_hours">6 hours</string>
|
<string name="app_lock_timeout_6_hours">6 hours</string>
|
||||||
<string name="app_lock_timeout_12_hours">12 hours</string>
|
<string name="app_lock_timeout_12_hours">12 hours</string>
|
||||||
<string name="app_lock_timeout_24_hours">24 hours</string>
|
<string name="app_lock_timeout_24_hours">24 hours</string>
|
||||||
|
<string name="action_go_to_wiki">Go to Wiki</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user