Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2022-04-07 16:43:56 +02:00
parent cf932e69e7
commit 930d3e61fd
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
3 changed files with 4 additions and 5 deletions

View file

@ -1223,7 +1223,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
@Override @Override
public String getSectionName(int position) { public String getSectionName(int position) {
// sort // sort
Enum<FileSortOrder.SortType> sortOrderType; FileSortOrder.SortType sortOrderType;
if (ocFileListFragmentInterface.isGalleryFragment()) { if (ocFileListFragmentInterface.isGalleryFragment()) {
sortOrderType = FileSortOrder.SortType.DATE; sortOrderType = FileSortOrder.SortType.DATE;
} else { } else {
@ -1237,7 +1237,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
} }
if (sortOrderType == FileSortOrder.SortType.ALPHABET) { if (sortOrderType == FileSortOrder.SortType.ALPHABET) {
return String.valueOf(file.getFileName().charAt(0)); return String.valueOf(file.getFileName().charAt(0)).toUpperCase();
} else if (sortOrderType == FileSortOrder.SortType.DATE) { } else if (sortOrderType == FileSortOrder.SortType.DATE) {
long milliseconds = file.getModificationTimestamp(); long milliseconds = file.getModificationTimestamp();
Date date = new Date(milliseconds); Date date = new Date(milliseconds);

View file

@ -111,7 +111,7 @@ open class FileSortOrder(@JvmField var name: String, var isAscending: Boolean) {
return files return files
} }
open fun getType(): Enum<SortType> { open fun getType(): SortType {
return when (name) { return when (name) {
sort_z_to_a_id, sort_z_to_a_id,
sort_a_to_z_id -> SortType.ALPHABET sort_a_to_z_id -> SortType.ALPHABET

View file

@ -37,8 +37,7 @@
app:fastScrollPopupBgColor="@color/color_accent" app:fastScrollPopupBgColor="@color/color_accent"
app:fastScrollPopupTextColor="@color/login_text_color" app:fastScrollPopupTextColor="@color/login_text_color"
app:fastScrollThumbColor="@color/color_accent" app:fastScrollThumbColor="@color/color_accent"
app:fastScrollAutoHide="true" app:fastScrollAutoHide="false" />
app:fastScrollAutoHideDelay="1500" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<include <include