From 73d26612f4793f12a61b2ff8be60b23297b546ad Mon Sep 17 00:00:00 2001 From: FranckRJ Date: Sun, 14 Jan 2018 13:10:11 +0100 Subject: [PATCH 1/4] =?UTF-8?q?Correction=20d'un=20bug=20de=20lecture=20de?= =?UTF-8?q?s=20m=C3=A9dias=20avec=20le=20navigateur=20interne.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../franckrj/respawnirc/ConnectActivity.java | 17 ++++++++++++++++- .../franckrj/respawnirc/WebBrowserActivity.java | 14 ++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/java/com/franckrj/respawnirc/ConnectActivity.java b/java/com/franckrj/respawnirc/ConnectActivity.java index eca44c0b..b892ac6e 100644 --- a/java/com/franckrj/respawnirc/ConnectActivity.java +++ b/java/com/franckrj/respawnirc/ConnectActivity.java @@ -25,6 +25,7 @@ public class ConnectActivity extends AbsHomeIsBackActivity { private static final long MAX_TIME_USER_HAVE_TO_LEAVE_IN_MS = 3_500; + private WebView jvcWebView = null; private EditText pseudoText = null; private HelpConnectDialogFragment helpDialogFragment = null; private long lastTimeUserTryToLeaveInMs = -MAX_TIME_USER_HAVE_TO_LEAVE_IN_MS; @@ -76,7 +77,7 @@ public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_connect); initToolbar(R.id.toolbar_connect); - WebView jvcWebView = findViewById(R.id.webview_connect); + jvcWebView = findViewById(R.id.webview_connect); pseudoText = findViewById(R.id.pseudo_text_connect); helpDialogFragment = new HelpConnectDialogFragment(); @@ -100,6 +101,20 @@ public void onCreate(Bundle savedInstanceState) { PrefsManager.applyChanges(); } + @Override + public void onResume() { + super.onResume(); + jvcWebView.resumeTimers(); + jvcWebView.onResume(); + } + + @Override + public void onPause() { + jvcWebView.onPause(); + jvcWebView.pauseTimers(); + super.onPause(); + } + @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); diff --git a/java/com/franckrj/respawnirc/WebBrowserActivity.java b/java/com/franckrj/respawnirc/WebBrowserActivity.java index 6e7eb88c..50b93a39 100644 --- a/java/com/franckrj/respawnirc/WebBrowserActivity.java +++ b/java/com/franckrj/respawnirc/WebBrowserActivity.java @@ -102,6 +102,20 @@ public void onReceivedTitle(WebView view, String title) { PrefsManager.applyChanges(); } + @Override + public void onResume() { + super.onResume(); + browserWebView.resumeTimers(); + browserWebView.onResume(); + } + + @Override + public void onPause() { + browserWebView.onPause(); + browserWebView.pauseTimers(); + super.onPause(); + } + @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); From 69d2b191dd083f11e9eba43a3746b4b392509aeb Mon Sep 17 00:00:00 2001 From: FranckRJ Date: Sun, 14 Jan 2018 13:32:10 +0100 Subject: [PATCH 2/4] Correction d'un bug d'affichage des spoils dans les signatures. --- java/com/franckrj/respawnirc/utils/JVCParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/com/franckrj/respawnirc/utils/JVCParser.java b/java/com/franckrj/respawnirc/utils/JVCParser.java index 6434f5db..f2888bb2 100644 --- a/java/com/franckrj/respawnirc/utils/JVCParser.java +++ b/java/com/franckrj/respawnirc/utils/JVCParser.java @@ -22,7 +22,7 @@ public final class JVCParser { private static final Pattern ajaxSubHashPattern = Pattern.compile(""); private static final Pattern messageQuotePattern = Pattern.compile("\"txt\":\"(.*)\"", Pattern.DOTALL); private static final Pattern entireMessagePattern = Pattern.compile("(
|
|
)", Pattern.DOTALL); - private static final Pattern signaturePattern = Pattern.compile("
(.*?)
", Pattern.DOTALL); + private static final Pattern signaturePattern = Pattern.compile("
(.*)", Pattern.DOTALL); private static final Pattern avatarPattern = Pattern.compile(".*?.*?", Pattern.DOTALL); private static final Pattern pseudoIsBlacklistedPattern = Pattern.compile("
Date: Mon, 15 Jan 2018 23:42:17 +0100 Subject: [PATCH 3/4] =?UTF-8?q?Affichage=20d'un=20message=20d'erreur=20pou?= =?UTF-8?q?r=20les=20vid=C3=A9os=20JVC=20int=C3=A9gr=C3=A9es.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- java/com/franckrj/respawnirc/utils/JVCParser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/com/franckrj/respawnirc/utils/JVCParser.java b/java/com/franckrj/respawnirc/utils/JVCParser.java index f2888bb2..86e098e5 100644 --- a/java/com/franckrj/respawnirc/utils/JVCParser.java +++ b/java/com/franckrj/respawnirc/utils/JVCParser.java @@ -86,6 +86,7 @@ public final class JVCParser { private static final Pattern longLinkPattern = Pattern.compile("[^<]*[^<]*[^<]*"); private static final Pattern smileyPattern = Pattern.compile("\"[^\"]*\"]*>"); private static final Pattern youtubeVideoPattern = Pattern.compile("
"); + private static final Pattern jvcVideoPattern = Pattern.compile("
.*?
[^<]*
[^<]*
[^<]*
", Pattern.DOTALL); private static final Pattern surroundedBlockquotePattern = Pattern.compile("(
*)*(<(/)?blockquote>)( *
)*"); private static final Pattern noelshackImagePattern = Pattern.compile("]*>\"([^\"]*)\"[^]*>"); private static final Pattern emptySearchPattern = Pattern.compile("[ \\n\\r]*Aucune réponse pour votre recherche ![ \\n\\r]*"); @@ -885,6 +886,7 @@ public static String parseMessageToPrettyMessage(String messageInString, Setting ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, smileyPattern, 2, "", null, null); ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, youtubeVideoPattern, 2, "http://youtu.be/", 2, ""); + ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, jvcVideoPattern, -1, "[[Vidéo non supportée par l'application]]", "", null, null); ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, jvcLinkPattern, 1, "", "", makeLinkDependingOnSettingsAndForceMake, null); ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, shortLinkPattern, 1, "", "", makeLinkDependingOnSettingsAndForceMake, null); ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, longLinkPattern, 1, "", "", makeLinkDependingOnSettingsAndForceMake, null); @@ -935,6 +937,7 @@ public static String parseMessageToSimpleMessage(String messageInString) { ToolForParsing.replaceStringByAnother(messageInBuilder, "\n", ""); ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, smileyPattern, 3, "", "", null, null); ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, youtubeVideoPattern, 2, "http://youtu.be/", "", null, null); + ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, jvcVideoPattern, -1, "[[Vidéo non supportée par l'application]]", "", null, null); ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, jvcLinkPattern, 1, "", "", null, null); ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, shortLinkPattern, 1, "", "", null, null); ToolForParsing.parseThisMessageWithThisPattern(messageInBuilder, longLinkPattern, 1, "", "", null, null); From 124e33ab0768c67f56fadc74f5b9492a109b3fb2 Mon Sep 17 00:00:00 2001 From: Franck W Date: Tue, 16 Jan 2018 12:16:57 +0100 Subject: [PATCH 4/4] =?UTF-8?q?Passage=20=C3=A0=20la=20version=201.9.2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.build.gradle b/app.build.gradle index 383061f9..975d21ba 100644 --- a/app.build.gradle +++ b/app.build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.franckrj.respawnirc" minSdkVersion 15 targetSdkVersion 27 - versionCode 1_009_2_001 - versionName "1.9.1" + versionCode 1_009_2_002 + versionName "1.9.2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" resConfigs "fr" }