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

Commit 7f259b94 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix bug where file size would display for folders with false info"

parents c143c29c cf5cbc03
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -48,11 +48,13 @@ public class DetailsView extends TableView implements DetailsDisplay {
        Lookup<String, String> fileTypeLookup =
                DocumentsApplication.getFileTypeLookup(getContext());

        put(R.string.sort_dimension_file_type, fileTypeLookup.lookup(doc.mimeType));
        String mimeType = fileTypeLookup.lookup(doc.mimeType);

        put(R.string.sort_dimension_file_type, mimeType);

        // TODO: Each of these rows need to be removed if the condition is false and previously
        // set.
        if (doc.size > 0) {
        if (doc.size > 0 && !doc.isDirectory()) {
            put(R.string.sort_dimension_size, Formatter.formatFileSize(getContext(), doc.size));
        }