From 785b18cb412d067f407b474b4098cdb9bb1773a1 Mon Sep 17 00:00:00 2001 From: Andy Klimczak Date: Sun, 6 Aug 2017 20:12:18 -0400 Subject: [PATCH 1/9] Do not include >>post no from quoted posts, when quoting with text --- .../java/org/floens/chan/core/presenter/ReplyPresenter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java b/Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java index e41f297b..0259e4de 100644 --- a/Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java +++ b/Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java @@ -280,8 +280,11 @@ public class ReplyPresenter implements ReplyManager.HttpCallback, if (withText) { String[] lines = post.comment.toString().split("\n+"); + final Pattern quotePattern = Pattern.compile("^>>\\d+(\\s\\(OP\\))?$"); // matches for >>123 or >>123 (OP) for (String line : lines) { - textToInsert += ">" + line + "\n"; + if(!quotePattern.matcher(line).matches()) { // do not include post no from quoted post + textToInsert += ">" + line + "\n"; + } } } From 49f087636f861ddbdbdf8558d099721b76bb8cc0 Mon Sep 17 00:00:00 2001 From: Florens Date: Mon, 14 Aug 2017 15:54:06 +0200 Subject: [PATCH 2/9] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b6056739..60f6da8b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Clover adds inline replying, thread watching, notifications, themes, pass suppor ## Contributing Contributing to Clover is appreciated, there's always stuff to do or bugs to fix. I keep the todo list of Clover in the [Clover Trello board](https://trello.com/b/V6gclKvM/clover). +We also have a Slack, send an email to [me](https://github.com/Floens) (email listed in bio) for an invite. [Make a new theme](https://github.com/Floens/Clover/wiki/Adding-a-new-theme) From 8f2275b596097f93f21c4dad8db6c51b58210a90 Mon Sep 17 00:00:00 2001 From: Andy Klimczak Date: Sun, 20 Aug 2017 19:07:31 -0400 Subject: [PATCH 3/9] Simplify regex for removing post no when quoting with text --- .../java/org/floens/chan/core/presenter/ReplyPresenter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java b/Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java index 0259e4de..3c5e529f 100644 --- a/Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java +++ b/Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java @@ -280,7 +280,7 @@ public class ReplyPresenter implements ReplyManager.HttpCallback, if (withText) { String[] lines = post.comment.toString().split("\n+"); - final Pattern quotePattern = Pattern.compile("^>>\\d+(\\s\\(OP\\))?$"); // matches for >>123 or >>123 (OP) + final Pattern quotePattern = Pattern.compile("^>>(>/[a-z0-9]+/)?\\d+.*$"); // matches for >>123, >>123 (OP), >>123 (You), >>>/fit/123 for (String line : lines) { if(!quotePattern.matcher(line).matches()) { // do not include post no from quoted post textToInsert += ">" + line + "\n"; From 2f4cb7999eecb1385ef384c195b5f5f443bb9fd4 Mon Sep 17 00:00:00 2001 From: Florens Date: Tue, 22 Aug 2017 13:30:18 +0200 Subject: [PATCH 4/9] readme: licenses url fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 60f6da8b..40b4f021 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,4 @@ See the [Clover setup guide](https://github.com/Floens/Clover/wiki/Building-Clov ## License * Clover is [GPLv3](https://github.com/Floens/Clover/blob/master/COPYING.txt) -* [Licenses of the used libraries](https://github.com/Floens/Clover/master/Clover/app/src/main/assets/html/licenses.html). +* [Licenses of the used libraries](https://github.com/Floens/Clover/blob/dev/Clover/app/src/main/assets/html/licenses.html). From 23d265ae592841d6ba2be960e1e382cca060130a Mon Sep 17 00:00:00 2001 From: Florens Date: Tue, 29 Aug 2017 11:18:56 +0200 Subject: [PATCH 5/9] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40b4f021..4f6cb147 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Clover - 4chan browser for Android [![build status](https://travis-ci.org/Floens/Clover.svg?branch=dev)](https://travis-ci.org/Floens/Clover) +[![slack](https://slack.plebco.de/badge.svg)](https://slack.plebco.de/) +[![irc](https://img.shields.io/badge/freenode-%23Clover-blue.svg)](https://webchat.freenode.net/?url=irc:///#Clover) Clover is a fast Android app for browsing [4chan](https://www.4chan.org/). Clover adds inline replying, thread watching, notifications, themes, pass support, filters and a whole lot more. Clover is licensed under the GPL and will always be free. @@ -12,7 +14,6 @@ Clover adds inline replying, thread watching, notifications, themes, pass suppor ## Contributing Contributing to Clover is appreciated, there's always stuff to do or bugs to fix. I keep the todo list of Clover in the [Clover Trello board](https://trello.com/b/V6gclKvM/clover). -We also have a Slack, send an email to [me](https://github.com/Floens) (email listed in bio) for an invite. [Make a new theme](https://github.com/Floens/Clover/wiki/Adding-a-new-theme) From acc614122b091e5481b3a2062edf67f3e33752c3 Mon Sep 17 00:00:00 2001 From: Florens Date: Mon, 18 Sep 2017 13:02:12 +0200 Subject: [PATCH 6/9] readme: remove build status badge travis can't handle an android project this "big" so just stop using it for now and look for alternatives. it's not that we have tests or codestyles to check... --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 4f6cb147..e9ebc3bf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # Clover - 4chan browser for Android -[![build status](https://travis-ci.org/Floens/Clover.svg?branch=dev)](https://travis-ci.org/Floens/Clover) [![slack](https://slack.plebco.de/badge.svg)](https://slack.plebco.de/) [![irc](https://img.shields.io/badge/freenode-%23Clover-blue.svg)](https://webchat.freenode.net/?url=irc:///#Clover) From 8549c6898c83a78856c166462d6783731a84c3ae Mon Sep 17 00:00:00 2001 From: Floens Date: Wed, 8 Nov 2017 20:22:58 +0100 Subject: [PATCH 7/9] controller: call perform after setCallback. Performing the animation is immediate if animations are disabled, therefore the callback will never be called, and thus blocking the ui forever. Closes #360 --- .../src/main/java/org/floens/chan/controller/Controller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Clover/app/src/main/java/org/floens/chan/controller/Controller.java b/Clover/app/src/main/java/org/floens/chan/controller/Controller.java index 9dffa588..d8154a5c 100644 --- a/Clover/app/src/main/java/org/floens/chan/controller/Controller.java +++ b/Clover/app/src/main/java/org/floens/chan/controller/Controller.java @@ -215,13 +215,13 @@ public abstract class Controller { if (animated) { ControllerTransition transition = new FadeOutTransition(); transition.from = this; - transition.perform(); transition.setCallback(new ControllerTransition.Callback() { @Override public void onControllerTransitionCompleted(ControllerTransition transition) { finishPresenting(); } }); + transition.perform(); } else { finishPresenting(); } From a02c70d656d668499d616efe3cfb608601b70445 Mon Sep 17 00:00:00 2001 From: Floens Date: Wed, 8 Nov 2017 20:25:10 +0100 Subject: [PATCH 8/9] build: update build tools, support libs version. --- Clover/app/build.gradle | 40 +++++++++++-------- Clover/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 4 +- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/Clover/app/build.gradle b/Clover/app/build.gradle index 20bfde14..3c7e0c87 100644 --- a/Clover/app/build.gradle +++ b/Clover/app/build.gradle @@ -15,7 +15,7 @@ def getCommitHash = { -> android { compileSdkVersion 25 // update the travis config when changing this - buildToolsVersion '25.0.2' + buildToolsVersion '26.0.2' defaultConfig { minSdkVersion 15 @@ -68,10 +68,12 @@ android { } defaultPublishConfig "default" + flavorDimensions "default" productFlavors { // The app name refers to the name as displayed on the launcher. // the flavor name is appended to the name in the settings. "default" { + dimension "default" applicationId "org.floens.chan" resValue "string", "app_name", "Clover" resValue "string", "app_flavor_name", "" @@ -79,6 +81,7 @@ android { } dev { + dimension "default" applicationId "org.floens.chan.dev" resValue "string", "app_name", "Clover dev" resValue "string", "app_flavor_name", "" @@ -86,6 +89,7 @@ android { } fdroid { + dimension "default" applicationId "org.floens.chan" resValue "string", "app_name", "Clover" resValue "string", "app_flavor_name", "F-Droid" @@ -115,20 +119,22 @@ android { } dependencies { - compile 'com.android.support:support-v13:25.3.1' - compile 'com.android.support:appcompat-v7:25.3.1' - compile 'com.android.support:recyclerview-v7:25.3.1' - compile 'com.android.support:cardview-v7:25.3.1' - compile 'com.android.support:support-annotations:25.3.1' - compile 'com.android.support:design:25.3.1' - compile 'com.android.support:customtabs:25.3.1' - - compile 'org.jsoup:jsoup:1.9.2' - compile 'com.j256.ormlite:ormlite-core:4.48' - compile 'com.j256.ormlite:ormlite-android:4.48' - compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.16' - compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0' - compile 'com.squareup.okhttp3:okhttp:3.4.1' - compile 'de.greenrobot:eventbus:2.4.0' - compile 'org.nibor.autolink:autolink:0.6.0' + def supportVersion = '25.4.0' + + implementation "com.android.support:support-v13:${supportVersion}" + implementation "com.android.support:appcompat-v7:${supportVersion}" + implementation "com.android.support:recyclerview-v7:${supportVersion}" + implementation "com.android.support:cardview-v7:${supportVersion}" + implementation "com.android.support:support-annotations:${supportVersion}" + implementation "com.android.support:design:${supportVersion}" + implementation "com.android.support:customtabs:${supportVersion}" + + implementation 'com.squareup.okhttp3:okhttp:3.8.0' + implementation 'com.j256.ormlite:ormlite-core:4.48' + implementation 'com.j256.ormlite:ormlite-android:4.48' + implementation 'org.jsoup:jsoup:1.9.2' + implementation 'pl.droidsonroids.gif:android-gif-drawable:1.1.16' + implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0' + implementation 'de.greenrobot:eventbus:2.4.0' + implementation 'org.nibor.autolink:autolink:0.6.0' } diff --git a/Clover/build.gradle b/Clover/build.gradle index 8674409c..6013117a 100644 --- a/Clover/build.gradle +++ b/Clover/build.gradle @@ -1,15 +1,17 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { + google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' + classpath 'com.android.tools.build:gradle:3.0.0' } } allprojects { repositories { + google() jcenter() } } diff --git a/Clover/gradle/wrapper/gradle-wrapper.properties b/Clover/gradle/wrapper/gradle-wrapper.properties index 8faa73e1..a2361484 100644 --- a/Clover/gradle/wrapper/gradle-wrapper.properties +++ b/Clover/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Mar 07 00:32:11 EST 2017 +#Tue Oct 31 23:48:24 CET 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip From 1ecf91fef8f89f9f2e9a1471c272a07921d8fc22 Mon Sep 17 00:00:00 2001 From: Floens Date: Tue, 19 Dec 2017 21:27:54 +0100 Subject: [PATCH 9/9] build: update tools, fix travis version, compile with 26 --- .travis.yml | 4 ++-- Clover/app/build.gradle | 2 +- Clover/build.gradle | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e953821d..a95a49de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ android: - platform-tools - tools - extra-android-m2repository - - build-tools-25.0.2 - - android-25 + - build-tools-26.0.2 + - android-26 script: cd Clover && ./gradlew build --console plain -x lint diff --git a/Clover/app/build.gradle b/Clover/app/build.gradle index 3c7e0c87..8b0e487a 100644 --- a/Clover/app/build.gradle +++ b/Clover/app/build.gradle @@ -13,7 +13,7 @@ def getCommitHash = { -> } android { - compileSdkVersion 25 + compileSdkVersion 26 // update the travis config when changing this buildToolsVersion '26.0.2' diff --git a/Clover/build.gradle b/Clover/build.gradle index 6013117a..277c10f0 100644 --- a/Clover/build.gradle +++ b/Clover/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0' + classpath 'com.android.tools.build:gradle:3.0.1' } }