1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-12-22 19:08:03 +01:00

Forgot to change title when openend some post, #41

This commit is contained in:
vanitasvitae 2016-08-01 01:21:35 +02:00
parent efba350907
commit 3c6558df9c

View file

@ -538,11 +538,14 @@ public class MainActivity extends AppCompatActivity
@Override
public void onReceive(Context context, Intent intent) {
String url = intent.getStringExtra(EXTRA_URL);
Log.d(App.TAG, "BroadcastReceiver: Received setTitleIntent: "+url);
if (url != null && url.startsWith("https://"+podDomain)) {
String subUrl = url.substring(("https://"+podDomain).length());
Log.d(App.TAG, "LocalBroadcastReceiver: SubUrl: "+subUrl);
if (subUrl.startsWith("/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")) {
setTitle(R.string.title_notifications);
} else if (subUrl.startsWith("/conversations")) {