mirror of
https://github.com/gsantner/dandelion
synced 2024-11-16 17:32:08 +01:00
Forgot to change title when openend some post, #41
This commit is contained in:
parent
efba350907
commit
3c6558df9c
1 changed files with 3 additions and 0 deletions
|
@ -538,11 +538,14 @@ public class MainActivity extends AppCompatActivity
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
String url = intent.getStringExtra(EXTRA_URL);
|
String url = intent.getStringExtra(EXTRA_URL);
|
||||||
|
Log.d(App.TAG, "BroadcastReceiver: Received setTitleIntent: "+url);
|
||||||
if (url != null && url.startsWith("https://"+podDomain)) {
|
if (url != null && url.startsWith("https://"+podDomain)) {
|
||||||
String subUrl = url.substring(("https://"+podDomain).length());
|
String subUrl = url.substring(("https://"+podDomain).length());
|
||||||
Log.d(App.TAG, "LocalBroadcastReceiver: SubUrl: "+subUrl);
|
Log.d(App.TAG, "LocalBroadcastReceiver: SubUrl: "+subUrl);
|
||||||
if (subUrl.startsWith("/stream")) {
|
if (subUrl.startsWith("/stream")) {
|
||||||
setTitle(R.string.title_stream);
|
setTitle(R.string.title_stream);
|
||||||
|
} else if (subUrl.startsWith("/posts/")) {
|
||||||
|
setTitle(R.string.diaspora); //TODO: Extract posts title somehow?
|
||||||
} else if(subUrl.startsWith("/notifications")) {
|
} else if(subUrl.startsWith("/notifications")) {
|
||||||
setTitle(R.string.title_notifications);
|
setTitle(R.string.title_notifications);
|
||||||
} else if (subUrl.startsWith("/conversations")) {
|
} else if (subUrl.startsWith("/conversations")) {
|
||||||
|
|
Loading…
Reference in a new issue