Add recent changes message

multisite
Floens 10 years ago
parent 6f52c61810
commit 8f2c4dc47a
  1. 28
      Clover/app/src/main/java/org/floens/chan/ui/helper/PreviousVersionHandler.java
  2. 16
      Clover/app/src/main/res/values/strings.xml

@ -18,23 +18,41 @@
package org.floens.chan.ui.helper;
import android.content.Context;
import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
import android.text.Html;
import android.widget.Button;
import org.floens.chan.R;
import org.floens.chan.core.settings.ChanSettings;
import org.floens.chan.utils.AndroidUtils;
public class PreviousVersionHandler {
private static final int CURRENT_VERSION = 1;
public void run(Context context) {
if (ChanSettings.previousVersion.get() < CURRENT_VERSION) {
CharSequence message = Html.fromHtml(context.getString(R.string.previous_version_1));
int resource = context.getResources().getIdentifier("previous_version_" + CURRENT_VERSION, "string", context.getPackageName());
if (resource != 0) {
CharSequence message = Html.fromHtml(context.getString(resource));
new AlertDialog.Builder(context)
.setMessage(message)
.setPositiveButton(R.string.ok, null)
.show();
final AlertDialog dialog = new AlertDialog.Builder(context)
.setMessage(message)
.setPositiveButton(R.string.ok, null)
.create();
dialog.show();
dialog.setCanceledOnTouchOutside(false);
final Button button = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
button.setEnabled(false);
AndroidUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
dialog.setCanceledOnTouchOutside(true);
button.setEnabled(true);
}
}, 1500);
}
ChanSettings.previousVersion.set(CURRENT_VERSION);
}

@ -21,7 +21,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<string name="previous_version_1">
<![CDATA[
<h3>Clover was updated</h3>
Put recent changes here
This is the beta of Clover v2, redesigned with the Google Material Design guidelines in mind.<br>
<br>
<b>Biggest changes:</b><br>
- New inline reply layout.<br>
- Support for thread hiding.<br>
- Support for filtering threads, making posts either highlighted, hidden or completely removed.<br>
- Support for history.<br>
- More themes were added.<br>
- Album downloads have been improved.<br>
- Catalog mode now uses cards.<br>
- More advanced options added.<br>
- Minor features and bug fixes.<br>
<br>
<b>Please provide feedback on GitHub or by writing an email, links are at the bottom of the settings screen.</b>
]]>
</string>

Loading…
Cancel
Save