Search bar: Display suggestion when starting by @ or #

This commit is contained in:
Thomas 2023-01-10 16:51:02 +01:00
parent 4ec8496124
commit b0e01e5bf1
2 changed files with 6 additions and 2 deletions

View file

@ -522,9 +522,8 @@ public class Helper {
long months = days / 30;
long years = days / 365;
String format = DateFormat.getDateInstance(DateFormat.SHORT).format(date);
if (years > 0) {
return format;
return DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault()).format(date);
} else if (months > 0 || days > 7) {
//Removes the year depending of the locale from DateFormat.SHORT format
SimpleDateFormat df = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault());

View file

@ -464,6 +464,11 @@ public class PinnedTimelineHelper {
break;
case NITTER:
item.setIcon(R.drawable.nitter);
if (pinnedTimeline.remoteInstance.displayName.trim().length() > 0) {
item.setTitle(pinnedTimeline.remoteInstance.displayName);
} else {
item.setTitle(pinnedTimeline.remoteInstance.host);
}
break;
}
break;