diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-04-23 23:22:57 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-04-23 23:22:57 +0200 |
commit | b5abdd1b6ddf73cc9da49e3213d0d44e4b29ff5c (patch) | |
tree | b1d28cc2b00622d7feeff4569aa2a054d3a82b80 /src/main/java/de/thedevstack/conversationsplus/ui/dialogs | |
parent | 52fec558adb2b4d9bb3df314fd919570e7198e26 (diff) | |
parent | b789ace386ef3cfe6e0c3834b2a425813f702f43 (diff) |
Merge remote-tracking branch 'remotes/origin/trz/rename' into trz/rebase
Conflicts:
src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java
src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java
src/main/java/de/thedevstack/conversationsplus/utils/MessageUtil.java
src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java b/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java index e5a478e8..4f6cffb4 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java @@ -9,6 +9,7 @@ import java.util.Date; import de.thedevstack.android.logcat.Logging; import de.thedevstack.conversationsplus.ConversationsPlusColors; +import de.thedevstack.conversationsplus.utils.ui.TextViewUtil; import eu.siacs.conversations.R; import eu.siacs.conversations.entities.Conversation; @@ -60,11 +61,11 @@ public class MessageDetailsDialog extends AbstractAlertDialog { view.findViewById(R.id.dlgMsgDetFileTable).setVisibility(View.VISIBLE); if (null != message.getFileParams()) { Message.FileParams params = message.getFileParams(); - TextView tvFilesize = (TextView) view.findViewById(R.id.dlgMsgDetFileSize); - tvFilesize.setText(UIHelper.getHumanReadableFileSize(params.size)); + TextViewUtil.setText(view, R.id.dlgMsgDetFileSize, UIHelper.getHumanReadableFileSize(params.size)); } - TextView mimetype = (TextView) view.findViewById(R.id.dlgMsgDetFileMimeType); - mimetype.setText(message.getMimeType()); + TextViewUtil.setText(view, R.id.dlgMsgDetFileMimeType, message.getMimeType()); + + TextViewUtil.setText(view, R.id.dlgMsgDetFileHttpUploaded, message.isHttpUploaded() ? R.string.cplus_yes : R.string.cplus_no); } } @@ -108,7 +109,6 @@ public class MessageDetailsDialog extends AbstractAlertDialog { * @param message the message to display in dialog */ protected void displayMessageTypeInfo(View view, Message message) { - TextView msgTypeTextView = (TextView) view.findViewById(R.id.dlgMsgDetMsgType); int msgTypeResId; switch (message.getType()) { case Message.TYPE_PRIVATE: @@ -127,7 +127,7 @@ public class MessageDetailsDialog extends AbstractAlertDialog { default: msgTypeResId = R.string.dlg_msg_details_msg_type_text; } - msgTypeTextView.setText(msgTypeResId); + TextViewUtil.setText(view, R.id.dlgMsgDetMsgType, msgTypeResId); } /** @@ -147,10 +147,8 @@ public class MessageDetailsDialog extends AbstractAlertDialog { if (conversation.getMode() == Conversation.MODE_MULTI) { // Change label of sending and receiving party to MUC terminology - TextView senderLabel = (TextView) view.findViewById(R.id.dlgMsgDetLblSender); - senderLabel.setText(R.string.dlg_msg_details_sender_nick); - TextView receipientLabel = (TextView) view.findViewById(R.id.dlgMsgDetLblReceipient); - receipientLabel.setText(R.string.dlg_msg_details_receipient_nick); + TextViewUtil.setText(view, R.id.dlgMsgDetLblSender, R.string.dlg_msg_details_sender_nick); + TextViewUtil.setText(view, R.id.dlgMsgDetLblReceipient, R.string.dlg_msg_details_receipient_nick); // Get own nick for MUC me = conversation.getMucOptions().getActualNick(); @@ -174,7 +172,6 @@ public class MessageDetailsDialog extends AbstractAlertDialog { * @param message the message to display in dialog */ protected void displayMessageSentTime(View view, Message message) { - TextView timeSent = (TextView) view.findViewById(R.id.dlgMsgDetTimeSent); - timeSent.setText(DateFormat.format("dd.MM.yyyy kk:mm:ss", new Date(message.getTimeSent()))); + TextViewUtil.setText(view, R.id.dlgMsgDetTimeSent, DateFormat.format("dd.MM.yyyy kk:mm:ss", new Date(message.getTimeSent()))); } } |