diff --git a/app/src/main/java/org/mian/gitnex/activities/MainActivity.java b/app/src/main/java/org/mian/gitnex/activities/MainActivity.java
index f866625f..80dac10f 100644
--- a/app/src/main/java/org/mian/gitnex/activities/MainActivity.java
+++ b/app/src/main/java/org/mian/gitnex/activities/MainActivity.java
@@ -11,6 +11,8 @@ import androidx.drawerlayout.widget.DrawerLayout;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
@@ -157,7 +159,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
drawer = findViewById(R.id.drawer_layout);
NavigationView navigationView = findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
- final View hView = navigationView.getHeaderView(0);
+ final View hView = navigationView.getHeaderView(0);
ImageView navSubMenu = hView.findViewById(R.id.navSubMenu);
navSubMenu.setOnClickListener(new View.OnClickListener() {
@@ -287,8 +289,33 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
}
// Changelog popup
- ChangeLog changelogDialog = new ChangeLog(this);
- changelogDialog.showDialog();
+ int versionCode = 0;
+ try {
+ PackageInfo packageInfo = getApplicationContext().getPackageManager()
+ .getPackageInfo(getApplicationContext().getPackageName(), 0);
+ versionCode = packageInfo.versionCode;
+ }
+ catch (PackageManager.NameNotFoundException e) {
+ Log.e("changelogDialog", Objects.requireNonNull(e.getMessage()));
+ }
+
+ if (!tinyDb.getBoolean("versionFlag")) {
+ if (versionCode > tinyDb.getInt("versionCode")) {
+ tinyDb.putInt("versionCode", versionCode);
+ tinyDb.putBoolean("versionFlag", true);
+ }
+ else {
+ tinyDb.putBoolean("versionFlag", false);
+ }
+ }
+ else {
+ tinyDb.putBoolean("versionFlag", false);
+ }
+
+ if(tinyDb.getBoolean("versionFlag")) {
+ ChangeLog changelogDialog = new ChangeLog(this);
+ changelogDialog.showDialog();
+ }
}
diff --git a/app/src/main/java/org/mian/gitnex/helpers/ChangeLog.java b/app/src/main/java/org/mian/gitnex/helpers/ChangeLog.java
index 613638fe..c85e5a77 100644
--- a/app/src/main/java/org/mian/gitnex/helpers/ChangeLog.java
+++ b/app/src/main/java/org/mian/gitnex/helpers/ChangeLog.java
@@ -35,7 +35,7 @@ public class ChangeLog {
while ((eventType != XmlPullParser.END_TAG) || (aXml.getName().equals("change"))) {
- if ((eventType == XmlPullParser.START_TAG) &&(aXml.getName().equals("change"))) {
+ if ((eventType == XmlPullParser.START_TAG) && (aXml.getName().equals("change"))) {
eventType = aXml.next();
strBuilder.append(aXml.getText()).append("
");
}
@@ -93,7 +93,8 @@ public class ChangeLog {
androidx.appcompat.app.AlertDialog.Builder builder = new AlertDialog.Builder(changelogActivity);
builder.setTitle(R.string.changelogTitle);
builder.setMessage(Html.fromHtml("" + changelogMessage + ""));
- builder.setNegativeButton(R.string.okButton, (dialog, which) -> dialog.cancel());
+ builder.setNegativeButton(R.string.close, (dialog, which) -> dialog.cancel());
+ builder.setCancelable(false);
builder.create();
builder.show();
diff --git a/app/src/main/res/xml/changelog.xml b/app/src/main/res/xml/changelog.xml
index 1ec657c7..09181e95 100644
--- a/app/src/main/res/xml/changelog.xml
+++ b/app/src/main/res/xml/changelog.xml
@@ -1,6 +1,12 @@
+
+ Improvement: Show issues only in Issues Tabs
+ Bugfix: Files breadcrumb navigation links
+ Bugfix: Login with special characters
+
+
New: Light theme (choose from settings)
New: Icons