diff options
Diffstat (limited to 'Source/Android/app/src/main/java')
| -rw-r--r-- | Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/FileAdapter.java | 8 | ||||
| -rw-r--r-- | Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java | 12 |
2 files changed, 13 insertions, 7 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/FileAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/FileAdapter.java index 9ae238d36c..7ce0047b08 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/FileAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/FileAdapter.java @@ -26,7 +26,7 @@ public class FileAdapter extends RecyclerView.Adapter<FileViewHolder> implements * Initializes the dataset to be displayed, and associates the Adapter with the * Activity as an event listener. * - * @param path A String containing the path to the directory to be shown by this Adapter. + * @param path A String containing the path to the directory to be shown by this Adapter. * @param listener An Activity that can respond to callbacks from this Adapter. */ public FileAdapter(String path, FileClickListener listener) @@ -125,7 +125,8 @@ public class FileAdapter extends RecyclerView.Adapter<FileViewHolder> implements if (fileList.isEmpty()) { Toast.makeText(view.getContext(), R.string.add_directory_empty_folder, Toast.LENGTH_SHORT).show(); - } else + } + else { // Delay the loading of the new directory to give a little bit of time for UI feedback // to happen. Hacky, but good enough for now; this is necessary because we're modifying @@ -141,7 +142,8 @@ public class FileAdapter extends RecyclerView.Adapter<FileViewHolder> implements } }, 200); } - } else + } + else { // Pass the activity the path of the parent directory of the clicked file. mListener.finishSuccessfully(); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java index e15516dbaf..69b39438e8 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java @@ -26,7 +26,8 @@ public class FileListItem implements Comparable<FileListItem> if (file.isDirectory()) { mType = TYPE_FOLDER; - } else + } + else { String fileExtension = mPath.substring(mPath.lastIndexOf('.')); @@ -37,7 +38,8 @@ public class FileListItem implements Comparable<FileListItem> if (allowedExtensions.contains(fileExtension)) { mType = NativeLibrary.IsWiiTitle(mPath) ? TYPE_WII : TYPE_GC; - } else + } + else { mType = TYPE_OTHER; } @@ -67,12 +69,14 @@ public class FileListItem implements Comparable<FileListItem> if (theOther.getType() == getType()) { return getFilename().toLowerCase().compareTo(theOther.getFilename().toLowerCase()); - } else + } + else { if (getType() > theOther.getType()) { return 1; - } else + } + else { return -1; } |
