Release beta for v2.0.0

multisite
Floens 10 years ago
parent bff5f64c80
commit c69aed8455
  1. 13
      CHANGES.txt
  2. 4
      Clover/app/build.gradle
  3. 19
      Clover/app/src/main/java/org/floens/chan/Chan.java
  4. 37
      Clover/app/src/main/java/org/floens/chan/ui/helper/PreviousVersionHandler.java
  5. 1
      Clover/app/src/main/res/values/strings.xml

@ -1,3 +1,16 @@
New in 2.0.0 (2015-08-23)
- New design.
- New inline reply layout.
- Support for thread hiding.
- Support for filtering threads, making posts either highlighted, hidden or completely removed.
- Support for history.
- More themes were added.
- Album downloads have been improved.
- Catalog mode now uses cards.
- More advanced options added.
- Minor features and bug fixes.
New in 1.2.11 (2015-06-20) New in 1.2.11 (2015-06-20)
- Update/fix captchas - Update/fix captchas

@ -8,8 +8,8 @@ android {
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 22 targetSdkVersion 22
versionName "v1.2.11" versionName "v2.0.0"
versionCode 50 versionCode 51
} }
compileOptions { compileOptions {

@ -145,8 +145,6 @@ public class Chan extends Application {
version = version.toLowerCase(Locale.ENGLISH).replace(" ", "_"); version = version.toLowerCase(Locale.ENGLISH).replace(" ", "_");
userAgent = getString(R.string.app_name) + "/" + version; userAgent = getString(R.string.app_name) + "/" + version;
cleanupOutdated();
File cacheDir = getExternalCacheDir() != null ? getExternalCacheDir() : getCacheDir(); File cacheDir = getExternalCacheDir() != null ? getExternalCacheDir() : getCacheDir();
replyManager = new ReplyManager(this); replyManager = new ReplyManager(this);
@ -197,23 +195,6 @@ public class Chan extends Application {
return activityForegroundCounter > 0; return activityForegroundCounter > 0;
} }
private void cleanupOutdated() {
File ionCacheFolder = new File(getCacheDir() + "/ion");
if (ionCacheFolder.exists() && ionCacheFolder.isDirectory()) {
Logger.i(TAG, "Clearing old ion folder");
for (File file : ionCacheFolder.listFiles()) {
if (!file.delete()) {
Logger.i(TAG, "Could not delete old ion file " + file.getName());
}
}
if (!ionCacheFolder.delete()) {
Logger.i(TAG, "Could not delete old ion folder");
} else {
Logger.i(TAG, "Deleted old ion folder");
}
}
}
public static class ForegroundChangedMessage { public static class ForegroundChangedMessage {
public boolean inForeground; public boolean inForeground;

@ -26,13 +26,29 @@ import android.widget.Button;
import org.floens.chan.R; import org.floens.chan.R;
import org.floens.chan.core.settings.ChanSettings; import org.floens.chan.core.settings.ChanSettings;
import org.floens.chan.utils.AndroidUtils; import org.floens.chan.utils.AndroidUtils;
import org.floens.chan.utils.Logger;
import java.io.File;
public class PreviousVersionHandler { public class PreviousVersionHandler {
private static final String TAG = "PreviousVersionHandler";
private static final int CURRENT_VERSION = 1; private static final int CURRENT_VERSION = 1;
public void run(Context context) { public void run(Context context) {
if (ChanSettings.previousVersion.get() < CURRENT_VERSION) { int previous = ChanSettings.previousVersion.get();
int resource = context.getResources().getIdentifier("previous_version_" + CURRENT_VERSION, "string", context.getPackageName()); if (previous < CURRENT_VERSION) {
if (previous < 1) {
cleanupOutdatedIonFolder(context);
}
showMessage(context, CURRENT_VERSION);
ChanSettings.previousVersion.set(CURRENT_VERSION);
}
}
private void showMessage(Context context, int version) {
int resource = context.getResources().getIdentifier("previous_version_" + version, "string", context.getPackageName());
if (resource != 0) { if (resource != 0) {
CharSequence message = Html.fromHtml(context.getString(resource)); CharSequence message = Html.fromHtml(context.getString(resource));
@ -53,8 +69,23 @@ public class PreviousVersionHandler {
} }
}, 1500); }, 1500);
} }
}
ChanSettings.previousVersion.set(CURRENT_VERSION); private void cleanupOutdatedIonFolder(Context context) {
Logger.i(TAG, "Cleaning up old ion folder");
File ionCacheFolder = new File(context.getCacheDir() + "/ion");
if (ionCacheFolder.exists() && ionCacheFolder.isDirectory()) {
Logger.i(TAG, "Clearing old ion folder");
for (File file : ionCacheFolder.listFiles()) {
if (!file.delete()) {
Logger.i(TAG, "Could not delete old ion file " + file.getName());
}
}
if (!ionCacheFolder.delete()) {
Logger.i(TAG, "Could not delete old ion folder");
} else {
Logger.i(TAG, "Deleted old ion folder");
}
} }
} }
} }

@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
This is the beta of Clover v2, redesigned with the Google Material Design guidelines in mind.<br> This is the beta of Clover v2, redesigned with the Google Material Design guidelines in mind.<br>
<br> <br>
<b>Biggest changes:</b><br> <b>Biggest changes:</b><br>
- New design.<br>
- New inline reply layout.<br> - New inline reply layout.<br>
- Support for thread hiding.<br> - Support for thread hiding.<br>
- Support for filtering threads, making posts either highlighted, hidden or completely removed.<br> - Support for filtering threads, making posts either highlighted, hidden or completely removed.<br>

Loading…
Cancel
Save