1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-06-24 12:34:53 +02:00

Only set window title depending on webviews content, when DiasporaStreamFragment is displayed (do not overwrite other fragments title when the webview loads in the background)

This commit is contained in:
vanitasvitae 2016-10-03 23:04:09 +02:00
parent c005ef744d
commit 91c706ed4a

View file

@ -169,12 +169,18 @@ public class MainActivity extends AppCompatActivity
brSetTitle = new UpdateTitleReceiver(app, urls, new UpdateTitleReceiver.TitleCallback() {
@Override
public void setTitle(int rId) {
MainActivity.this.setTitle(rId);
CustomFragment top = getTopFragment();
if(top != null && top.getFragmentTag().equals(DiasporaStreamFragment.TAG)) {
MainActivity.this.setTitle(rId);
}
}
@Override
public void setTitle(String title) {
MainActivity.this.setTitle(title);
CustomFragment top = getTopFragment();
if(top != null && top.getFragmentTag().equals(DiasporaStreamFragment.TAG)) {
MainActivity.this.setTitle(title);
}
}
});