mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
wip
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
cf932e69e7
commit
930d3e61fd
3 changed files with 4 additions and 5 deletions
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue