mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-02 14:43:09 +01:00
Integrate DynamicLanguage with DeviceListFragment
Fixes #4752 Closes #4793
This commit is contained in:
committed by
Moxie Marlinspike
parent
03faff443c
commit
43aef3ecb0
@@ -34,18 +34,18 @@ public class DeviceListItem extends LinearLayout {
|
||||
this.lastActive = (TextView) findViewById(R.id.active);
|
||||
}
|
||||
|
||||
public void set(DeviceInfo deviceInfo) {
|
||||
public void set(DeviceInfo deviceInfo, Locale locale) {
|
||||
if (TextUtils.isEmpty(deviceInfo.getName())) this.name.setText(R.string.DeviceListItem_unnamed_device);
|
||||
else this.name.setText(deviceInfo.getName());
|
||||
|
||||
this.created.setText(getContext().getString(R.string.DeviceListItem_linked_s,
|
||||
DateUtils.getDayPrecisionTimeSpanString(getContext(),
|
||||
Locale.getDefault(),
|
||||
locale,
|
||||
deviceInfo.getCreated())));
|
||||
|
||||
this.lastActive.setText(getContext().getString(R.string.DeviceListItem_last_active_s,
|
||||
DateUtils.getDayPrecisionTimeSpanString(getContext(),
|
||||
Locale.getDefault(),
|
||||
locale,
|
||||
deviceInfo.getLastSeen())));
|
||||
|
||||
this.deviceId = deviceInfo.getId();
|
||||
|
||||
Reference in New Issue
Block a user