Skip to content

Commit

Permalink
Merge branch 'release/4.0' into feature/sdk34
Browse files Browse the repository at this point in the history
  • Loading branch information
TranceLove authored Oct 8, 2024
2 parents 55857a4 + 5cb924a commit 07599d3
Show file tree
Hide file tree
Showing 20 changed files with 462 additions and 457 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Downloads
[<img alt="Get it on Google Play" height="80" src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png">](https://play.google.com/store/apps/details?id=com.amaze.filemanager)
[<img alt="Get it on F-Droid" height="80" src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png">](https://f-droid.org/packages/com.amaze.filemanager/)
[<img alt="Get it on IzzyOnDroid" height="80" src="https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png">](https://apt.izzysoft.de/fdroid/index/apk/com.amaze.filemanager)
[<img alt="Get it on GitHub" height="80" src="https://i.ibb.co/q0mdc4Z/get-it-on-github.png">](https://github.com/TeamAmaze/AmazeFileManager/releases/latest)
[<img alt="Get it on AFH" height="50px" src="https://www.androidfilehost.com/images/afh.png">](https://www.androidfilehost.com/?w=files&flid=73967)

Contribute
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ dependencies {
implementation libs.androidX.cardview
implementation libs.androidX.constraintLayout
implementation libs.androidX.multidex //Multiple dex files
implementation libs.androidX.biometric
implementation libs.room.runtime
implementation libs.room.rxjava2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,26 +604,31 @@ else if (cursor.getCount() > 0 && cursor.moveToFirst()) {

TrashBin trashBin = AppConfig.getInstance().getTrashBinInstance();
List<LayoutElementParcelable> deletedFiles = new ArrayList<>();
if (trashBin != null) {
for (TrashBinFile trashBinFile : trashBin.listFilesInBin()) {
HybridFile hybridFile =
new HybridFile(
OpenMode.TRASH_BIN,
trashBinFile.getDeletedPath(
AppConfig.getInstance().getTrashBinInstance().getConfig()),
trashBinFile.getFileName(),
trashBinFile.isDirectory());
if (trashBinFile.getDeleteTime() != null) {
hybridFile.setLastModified(trashBinFile.getDeleteTime() * 1000);
}
LayoutElementParcelable element = hybridFile.generateLayoutElement(context, true);
element.date = trashBinFile.getDeleteTime();
element.longSize = trashBinFile.getSizeBytes();
element.size = Formatter.formatFileSize(context, trashBinFile.getSizeBytes());
element.dateModification = Utils.getDate(context, trashBinFile.getDeleteTime() * 1000);
element.isDirectory = trashBinFile.isDirectory();
deletedFiles.add(element);

if (trashBin == null) return deletedFiles;

List<TrashBinFile> filesInBin = trashBin.listFilesInBin();

if (filesInBin == null) return deletedFiles;

for (TrashBinFile trashBinFile : filesInBin) {
HybridFile hybridFile =
new HybridFile(
OpenMode.TRASH_BIN,
trashBinFile.getDeletedPath(
AppConfig.getInstance().getTrashBinInstance().getConfig()),
trashBinFile.getFileName(),
trashBinFile.isDirectory());
if (trashBinFile.getDeleteTime() != null) {
hybridFile.setLastModified(trashBinFile.getDeleteTime() * 1000);
}
LayoutElementParcelable element = hybridFile.generateLayoutElement(context, true);
element.date = trashBinFile.getDeleteTime();
element.longSize = trashBinFile.getSizeBytes();
element.size = Formatter.formatFileSize(context, trashBinFile.getSizeBytes());
element.dateModification = Utils.getDate(context, trashBinFile.getDeleteTime() * 1000);
element.isDirectory = trashBinFile.isDirectory();
deletedFiles.add(element);
}
return deletedFiles;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,7 @@ public TrashBinFile toTrashBinRestoreFile(Context context) {
TrashBin trashBin = AppConfig.getInstance().getTrashBinInstance();
for (TrashBinFile trashBinFile : trashBin.listFilesInBin()) {
if (trashBinFile.getDeletedPath(trashBin.getConfig()).equals(path)) {
// finding path to restore to
// finding path to restore tof
return new TrashBinFile(
getName(context), isDirectory(context), trashBinFile.getPath(), length(context), null);
}
Expand Down

This file was deleted.

Loading

0 comments on commit 07599d3

Please sign in to comment.