Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c79499d4 authored by Rohit Sekhar's avatar Rohit Sekhar
Browse files

Updater: Adapt displayVersion to show proper versioning

parent 95ebda49
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -252,7 +252,7 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
        String buildDate = StringGenerator.getDateLocalizedUTC(mActivity,
                DateFormat.LONG, update.getTimestamp());
        String buildVersion = mActivity.getString(R.string.list_build_version,
                update.getVersion());
                update.getDisplayVersion());
        
        if (!update.getAndroidVersion().equals(Build.VERSION.RELEASE)){
          viewHolder.mUpgradeType.setVisibility(TextView.VISIBLE);
@@ -455,7 +455,7 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
          String buildDate = StringGenerator.getDateLocalizedUTC(mActivity,
                           DateFormat.MEDIUM, update.getTimestamp());
          String buildInfoText = mActivity.getString(R.string.list_build_version_date,
                               update.getVersion(), buildDate);
                               update.getDisplayVersion(), buildDate);

            if(update.getAndroidVersion().equals(Build.VERSION.RELEASE)){
              title = R.string.apply_update_dialog_title;
+5 −1
Original line number Diff line number Diff line
@@ -96,7 +96,11 @@ public class Utils {
        update.setFileSize(object.getLong("size"));
        update.setDownloadUrl(object.getString("url"));
        update.setVersion(object.getString("version"));
        update.setDisplayVersion(object.getString("display_version"));
        if(object.has("pre_version") && !object.getString("pre_version").isEmpty()){
          update.setDisplayVersion(object.getString("version") + "-" + object.getString("pre_version"));
        } else {
          update.setDisplayVersion(object.getString("version"));
        }
        update.setAndroidVersion(object.getString("android_version"));
        return update;
    }