mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2025-12-08 19:05:54 +00:00
Appeal To Issue #470.
Comments, gists, and such; now state whether they've been edited or not.
This commit is contained in:
parent
6a985a406f
commit
084cf9b341
@ -6,6 +6,7 @@ import android.support.v7.widget.AppCompatImageView;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.fastaccess.App;
|
||||
import com.fastaccess.R;
|
||||
import com.fastaccess.data.dao.model.Comment;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
@ -63,7 +64,11 @@ public class CommentsViewHolder extends BaseViewHolder<Comment> {
|
||||
comment.setText("");
|
||||
}
|
||||
name.setText(commentsModel.getUser() != null ? commentsModel.getUser().getLogin() : "Anonymous");
|
||||
date.setText(ParseDateFormat.getTimeAgo(commentsModel.getCreatedAt()));
|
||||
if (commentsModel.getCreatedAt().before(commentsModel.getUpdatedAt())) {
|
||||
date.setText(ParseDateFormat.getTimeAgo(commentsModel.getCreatedAt()) + " " + App.getInstance().getResources().getString(R.string.edited));
|
||||
} else {
|
||||
date.setText(ParseDateFormat.getTimeAgo(commentsModel.getCreatedAt()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.fastaccess.App;
|
||||
import com.fastaccess.R;
|
||||
import com.fastaccess.data.dao.TimelineModel;
|
||||
import com.fastaccess.data.dao.model.Comment;
|
||||
@ -108,7 +109,11 @@ public class TimelineCommentsViewHolder extends BaseViewHolder<TimelineModel> {
|
||||
comment.setText("");
|
||||
}
|
||||
name.setText(commentsModel.getUser() != null ? commentsModel.getUser().getLogin() : "Anonymous");
|
||||
date.setText(ParseDateFormat.getTimeAgo(commentsModel.getCreatedAt()));
|
||||
if (commentsModel.getCreatedAt().before(commentsModel.getUpdatedAt())) {
|
||||
date.setText(ParseDateFormat.getTimeAgo(commentsModel.getCreatedAt()) + " " + App.getInstance().getResources().getString(R.string.edited));
|
||||
} else {
|
||||
date.setText(ParseDateFormat.getTimeAgo(commentsModel.getCreatedAt()));
|
||||
}
|
||||
if (showEmojies) {
|
||||
if (commentsModel.getReactions() != null) {
|
||||
ReactionsModel reaction = commentsModel.getReactions();
|
||||
|
||||
@ -206,7 +206,11 @@ public class GistActivity extends BaseActivity<GistMvp.View, GistPresenter>
|
||||
avatarLayout.setUrl(url, login);
|
||||
title.setText(gistsModel.getDisplayTitle(false, true));
|
||||
detailsIcon.setVisibility(InputHelper.isEmpty(gistsModel.getDescription()) || !ViewHelper.isEllipsed(title) ? View.GONE : View.VISIBLE);
|
||||
date.setText(ParseDateFormat.getTimeAgo(gistsModel.getCreatedAt()));
|
||||
if (gistsModel.getCreatedAt().before(gistsModel.getUpdatedAt())) {
|
||||
date.setText(ParseDateFormat.getTimeAgo(gistsModel.getCreatedAt()) + " " + getString(R.string.edited));
|
||||
} else {
|
||||
date.setText(ParseDateFormat.getTimeAgo(gistsModel.getCreatedAt()));
|
||||
}
|
||||
size.setText(Formatter.formatFileSize(this, gistsModel.getSize()));
|
||||
pager.setAdapter(new FragmentsPagerAdapter(getSupportFragmentManager(), FragmentPagerAdapterModel.buildForGist(this, gistsModel)));
|
||||
tabs.setupWithViewPager(pager);
|
||||
|
||||
@ -221,6 +221,7 @@
|
||||
<string name="switch_branch">Switch branch</string>
|
||||
<string name="assignees">Assignees</string>
|
||||
<string name="edit">Edit</string>
|
||||
<string name="edited">( edited )</string>
|
||||
<string name="update_issue">Update Issue</string>
|
||||
<string name="update_pull_request">Update Pull Request</string>
|
||||
<string name="no_milestones">No milestones</string>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user