mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
profiles: rename info-category items to what they are
This commit is contained in:
@@ -32,9 +32,9 @@ import java.util.Set;
|
||||
public class ProfileSettingsAdapter extends RecyclerView.Adapter
|
||||
implements StickyHeaderAdapter<ProfileSettingsAdapter.HeaderViewHolder>
|
||||
{
|
||||
public static final int SETTING_VERIFIED = 118;
|
||||
public static final int SETTING_LAST_SEEN = 119;
|
||||
public static final int SETTING_SEND_MESSAGE = 120;
|
||||
public static final int INFO_VERIFIED = 118;
|
||||
public static final int INFO_LAST_SEEN = 119;
|
||||
public static final int INFO_SEND_MESSAGE_BUTTON = 120;
|
||||
|
||||
private final @NonNull Context context;
|
||||
private final @NonNull Locale locale;
|
||||
@@ -317,7 +317,7 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter
|
||||
if (!dcContact.getVerifierAddr().isEmpty()) {
|
||||
verifiedInfo = context.getString(R.string.verified_by, dcContact.getVerifierAddr());
|
||||
}
|
||||
itemData.add(new ItemData(ItemData.CATEGORY_INFO, SETTING_VERIFIED, verifiedInfo, 0, R.drawable.ic_verified));
|
||||
itemData.add(new ItemData(ItemData.CATEGORY_INFO, INFO_VERIFIED, verifiedInfo, 0, R.drawable.ic_verified));
|
||||
}
|
||||
|
||||
long lastSeenTimestamp = (itemDataContact!=null? itemDataContact.getLastSeen() : 0);
|
||||
@@ -328,10 +328,10 @@ public class ProfileSettingsAdapter extends RecyclerView.Adapter
|
||||
else {
|
||||
lastSeenTxt = context.getString(R.string.last_seen_at, DateUtils.getExtendedTimeSpanString(context, locale, lastSeenTimestamp));
|
||||
}
|
||||
itemData.add(new ItemData(ItemData.CATEGORY_INFO, SETTING_LAST_SEEN, lastSeenTxt, 0, 0));
|
||||
itemData.add(new ItemData(ItemData.CATEGORY_INFO, INFO_LAST_SEEN, lastSeenTxt, 0, 0));
|
||||
|
||||
|
||||
itemData.add(new ItemData(ItemData.CATEGORY_INFO, SETTING_SEND_MESSAGE, context.getString(R.string.send_message), R.color.delta_accent, 0));
|
||||
itemData.add(new ItemData(ItemData.CATEGORY_INFO, INFO_SEND_MESSAGE_BUTTON, context.getString(R.string.send_message), R.color.delta_accent, 0));
|
||||
}
|
||||
|
||||
itemDataStatusText = dcContact.getStatus();
|
||||
|
||||
@@ -143,10 +143,10 @@ public class ProfileSettingsFragment extends Fragment
|
||||
@Override
|
||||
public void onSettingsClicked(int settingsId) {
|
||||
switch(settingsId) {
|
||||
case ProfileSettingsAdapter.SETTING_SEND_MESSAGE:
|
||||
case ProfileSettingsAdapter.INFO_SEND_MESSAGE_BUTTON:
|
||||
onSendMessage();
|
||||
break;
|
||||
case ProfileSettingsAdapter.SETTING_VERIFIED:
|
||||
case ProfileSettingsAdapter.INFO_VERIFIED:
|
||||
onVerifiedByClicked();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user