mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 12:22: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:
parent
c005ef744d
commit
91c706ed4a
1 changed files with 8 additions and 2 deletions
|
@ -169,12 +169,18 @@ public class MainActivity extends AppCompatActivity
|
||||||
brSetTitle = new UpdateTitleReceiver(app, urls, new UpdateTitleReceiver.TitleCallback() {
|
brSetTitle = new UpdateTitleReceiver(app, urls, new UpdateTitleReceiver.TitleCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void setTitle(int rId) {
|
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
|
@Override
|
||||||
public void setTitle(String title) {
|
public void setTitle(String title) {
|
||||||
MainActivity.this.setTitle(title);
|
CustomFragment top = getTopFragment();
|
||||||
|
if(top != null && top.getFragmentTag().equals(DiasporaStreamFragment.TAG)) {
|
||||||
|
MainActivity.this.setTitle(title);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue