mirror of
https://github.com/gsantner/dandelion
synced 2025-09-09 10:19:42 +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:
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() {
|
||||
@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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue