mirror of
https://github.com/gsantner/dandelion
synced 2025-09-09 10:19:42 +02:00
Update buildscript
This commit is contained in:
parent
8aec1aa74f
commit
3442f018e9
4 changed files with 34 additions and 23 deletions
|
@ -325,8 +325,16 @@ public class DiasporaStreamFragment extends BrowserFragment {
|
|||
@SuppressWarnings("unused")
|
||||
@JavascriptInterface
|
||||
public void setUserProfile(final String webMessage) throws JSONException {
|
||||
final DiasporaUserProfile pup = ((App) getActivity().getApplication()).getDiasporaUserProfile();
|
||||
App app = ((App) getActivity().getApplication());
|
||||
final DiasporaUserProfile pup = app.getDiasporaUserProfile();
|
||||
if (pup.isRefreshNeeded()) {
|
||||
try {
|
||||
// Try to very fail-safe check if user information gets really loaded from correct pod
|
||||
if (!webView.getUrl().startsWith(app.getSettings().getPod().getPodUrl().getBaseUrl())) {
|
||||
return;
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
AppLog.v(this, "DiasporaUserProfile needs refresh; Try to parse JSON");
|
||||
pup.parseJson(webMessage);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue