1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-22 04:12:08 +01: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,13 +169,19 @@ public class MainActivity extends AppCompatActivity
brSetTitle = new UpdateTitleReceiver(app, urls, new UpdateTitleReceiver.TitleCallback() {
@Override
public void setTitle(int rId) {
CustomFragment top = getTopFragment();
if(top != null && top.getFragmentTag().equals(DiasporaStreamFragment.TAG)) {
MainActivity.this.setTitle(rId);
}
}
@Override
public void setTitle(String title) {
CustomFragment top = getTopFragment();
if(top != null && top.getFragmentTag().equals(DiasporaStreamFragment.TAG)) {
MainActivity.this.setTitle(title);
}
}
});
if(!appSettings.hasPodDomain()) {