Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/TeamAmaze/AmazeFileManager
Browse files Browse the repository at this point in the history
…into fix-1475
  • Loading branch information
VishalNehra committed Nov 1, 2018
2 parents fe8474a + 65a18e8 commit 4acb3b3
Show file tree
Hide file tree
Showing 16 changed files with 1,398 additions and 1,055 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ dependencies {

implementation 'eu.chainfire:libsuperuser:1.0.0.+'

implementation 'com.cloudrail:cloudrail-si-android:2.22.1'
implementation 'com.cloudrail:cloudrail-si-android:2.22.4'

implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'//Nice charts and graphs

Expand Down
269 changes: 30 additions & 239 deletions app/src/main/java/com/amaze/filemanager/activities/MainActivity.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ public boolean getBoolean(String key) {
case PREFERENCE_SHOW_DIVIDERS:
case PREFERENCE_SHOW_HEADERS:
case PREFERENCE_USE_CIRCULAR_IMAGES:
case PREFERENCE_SHOW_LAST_MODIFIED:
case PREFERENCE_COLORIZE_ICONS:
case PREFERENCE_SHOW_THUMB:
case PREFERENCE_SHOW_SIDEBAR_QUICKACCESSES:
case PREFERENCE_NEED_TO_SET_HOME:
case PREFERENCE_SHOW_SIDEBAR_FOLDERS:
case PREFERENCE_VIEW:
case PREFERENCE_SHOW_LAST_MODIFIED:
defaultValue = true;
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void onBindViewHolder(final CompressedItemViewHolder holder, int position
GlideApp.with(compressedExplorerFragment).load(rowItem.iconData.image).into(holder.genericIcon);

if (compressedExplorerFragment.showLastModified)
holder.date.setText(Utils.getDate(rowItem.date, compressedExplorerFragment.year));
holder.date.setText(Utils.getDate(rowItem.date));
if (rowItem.directory) {
holder.genericIcon.setImageDrawable(folder);
gradientDrawable.setColor(compressedExplorerFragment.iconskin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import static com.amaze.filemanager.fragments.preference_fragments.PreferencesConstants.PREFERENCE_SHOW_PERMISSIONS;
import static com.amaze.filemanager.fragments.preference_fragments.PreferencesConstants.PREFERENCE_SHOW_THUMB;
import static com.amaze.filemanager.fragments.preference_fragments.PreferencesConstants.PREFERENCE_USE_CIRCULAR_IMAGES;
import static java.lang.Boolean.getBoolean;

/**
* This class is the information that serves to load the files into a "list" (a RecyclerView).
Expand Down Expand Up @@ -639,11 +640,10 @@ public void onBindViewHolder(final RecyclerView.ViewHolder vholder, int p) {
if (getBoolean(PREFERENCE_SHOW_PERMISSIONS))
holder.perm.setText(rowItem.permissions);
if (getBoolean(PREFERENCE_SHOW_LAST_MODIFIED)) {
holder.date.setText(rowItem.date1);
} else {
holder.date.setText(rowItem.dateModification);
} else{
holder.date.setVisibility(View.GONE);
}

if (isBackButton) {
holder.date.setText(rowItem.size);
holder.txtDesc.setText("");
Expand Down Expand Up @@ -774,8 +774,10 @@ public void onBindViewHolder(final RecyclerView.ViewHolder vholder, int p) {
holder.about.setColorFilter(grey_color);
showPopup(holder.about, rowItem);
}
if (getBoolean(PREFERENCE_SHOW_LAST_MODIFIED))
holder.date.setText(rowItem.date1);

if (getBoolean(PREFERENCE_SHOW_LAST_MODIFIED)) {
holder.date.setText(rowItem.dateModification);
}
if (isBackButton) {
holder.date.setText(rowItem.size);
holder.txtDesc.setText("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class LayoutElementParcelable implements Parcelable {
public final String size;
public final boolean isDirectory;
public final long date, longSize;
public final String date1;
public final String dateModification;
public final boolean header;

//same as hfile.modes but different than openmode in Main.java
Expand Down Expand Up @@ -101,10 +101,10 @@ public LayoutElementParcelable(String title, String path, String permissions,
this.isDirectory = isDirectory;
if (!date.trim().equals("")) {
this.date = Long.parseLong(date);
this.date1 = Utils.getDate(this.date, CURRENT_YEAR);
this.dateModification = Utils.getDate(this.date);
} else {
this.date = 0;
this.date1 = "";
this.dateModification = "";
}
}

Expand Down Expand Up @@ -144,7 +144,7 @@ public LayoutElementParcelable(Parcel im) {
int i = im.readInt();
header = i != 0;
isDirectory = j != 0;
date1 = im.readString();
dateModification = im.readString();
size = im.readString();
longSize=im.readLong();
}
Expand All @@ -166,7 +166,7 @@ public void writeToParcel(Parcel p1, int p2) {
p1.writeInt(isDirectory?1:0);
p1.writeLong(date);
p1.writeInt(header ? 1 : 0);
p1.writeString(date1);
p1.writeString(dateModification);
p1.writeString(size);
p1.writeLong(longSize);
}
Expand Down
Loading

0 comments on commit 4acb3b3

Please sign in to comment.