1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-24 21:32:07 +01:00

Show DiasporaStreamFragment instead of load stream page. Also fixed some formatting issue

This commit is contained in:
vanitasvitae 2016-10-24 18:09:27 +02:00
parent 34548c6518
commit 1356b81c64
Signed by: vanitasvitae
GPG key ID: DCCFB3302C9E4615

View file

@ -446,14 +446,14 @@ public class MainActivity extends ThemedActivity
showFragment(getFragment(PodSelectionFragment.TAG)); showFragment(getFragment(PodSelectionFragment.TAG));
} else if (ACTION_CLEAR_CACHE.equals(action)) { } else if (ACTION_CLEAR_CACHE.equals(action)) {
AppLog.v(this, "Clear WebView cache"); AppLog.v(this, "Clear WebView cache");
openDiasporaUrl(urls.getStreamUrl()); showFragment(getFragment(DiasporaStreamFragment.TAG));
ContextMenuWebView wv = ((DiasporaStreamFragment) getFragment(DiasporaStreamFragment.TAG)).getWebView(); ContextMenuWebView wv = ((DiasporaStreamFragment) getFragment(DiasporaStreamFragment.TAG)).getWebView();
if(wv != null) { if(wv != null) {
AppLog.d(this, "clearing...");
wv.clearCache(true); wv.clearCache(true);
} else { } else {
AppLog.e(this, "WebView is null!"); AppLog.e(this, "WebView is null!");
} }
} else if (Intent.ACTION_SEND.equals(action) && type != null) { } else if (Intent.ACTION_SEND.equals(action) && type != null) {
switch (type) { switch (type) {
case "text/plain": case "text/plain":
@ -891,7 +891,7 @@ public class MainActivity extends ThemedActivity
AppLog.v(this, "Set shared text; Subject: \"" + escapedSubject + "\" Body: \"" + escapedBody + "\""); AppLog.v(this, "Set shared text; Subject: \"" + escapedSubject + "\" Body: \"" + escapedBody + "\"");
textToBeShared = "**" + escapedSubject + "** " + escapedBody; textToBeShared = "**" + escapedSubject + "** " + escapedBody;
} else { } else {
AppLog.v(this, "Set shared text; Subject: \"" + sharedSubject + "\" Body: \"" + sharedBody + "\""); AppLog.v(this, "Set shared text; Subject: \"null\" Body: \"" + sharedBody + "\"");
textToBeShared = escapedBody; textToBeShared = escapedBody;
} }
} }
@ -1104,7 +1104,7 @@ public class MainActivity extends ThemedActivity
/** /**
* Set the string that will be shared into the new-post-editor * Set the string that will be shared into the new-post-editor
* *
* @param textToBeShared * @param textToBeShared text that the user wants to share in the post editor
*/ */
public void setTextToBeShared(String textToBeShared) { public void setTextToBeShared(String textToBeShared) {
this.textToBeShared = textToBeShared; this.textToBeShared = textToBeShared;