1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2025-09-09 10:19:42 +02:00

Update buildscript

This commit is contained in:
Gregor Santner 2018-02-06 23:11:18 +01:00
parent 8aec1aa74f
commit 3442f018e9
No known key found for this signature in database
GPG key ID: 7E83A7834AECB009
4 changed files with 34 additions and 23 deletions

View file

@ -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() {