mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
- beautify Timestamps
This commit is contained in:
parent
8d3a956c97
commit
56d9529b14
1 changed files with 5 additions and 6 deletions
|
@ -29,6 +29,7 @@ import android.content.Context;
|
|||
import android.content.SharedPreferences;
|
||||
import android.graphics.Bitmap;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.format.DateUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -181,9 +182,8 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
|
|||
fileSizeV.setVisibility(View.VISIBLE);
|
||||
fileSizeV.setText(DisplayUtils.bytesToHumanReadable(file.getFileLength()));
|
||||
lastModV.setVisibility(View.VISIBLE);
|
||||
lastModV.setText(
|
||||
DisplayUtils.unixTimeToHumanReadable(file.getModificationTimestamp())
|
||||
);
|
||||
lastModV.setText(DateUtils.getRelativeDateTimeString(mContext, file.getModificationTimestamp(),
|
||||
DateUtils.SECOND_IN_MILLIS, DateUtils.WEEK_IN_MILLIS, 0));
|
||||
// this if-else is needed even thoe fav icon is visible by default
|
||||
// because android reuses views in listview
|
||||
if (!file.keepInSync()) {
|
||||
|
@ -251,9 +251,8 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
|
|||
// }
|
||||
|
||||
lastModV.setVisibility(View.VISIBLE);
|
||||
lastModV.setText(
|
||||
DisplayUtils.unixTimeToHumanReadable(file.getModificationTimestamp())
|
||||
);
|
||||
lastModV.setText(DateUtils.getRelativeDateTimeString(mContext, file.getModificationTimestamp(),
|
||||
DateUtils.SECOND_IN_MILLIS, DateUtils.WEEK_IN_MILLIS, 0));
|
||||
checkBoxV.setVisibility(View.GONE);
|
||||
view.findViewById(R.id.imageView3).setVisibility(View.GONE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue