From b94d574b24815d7a0f8c9843a3372082ac989083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 20 Dec 2018 15:24:39 +0100 Subject: [PATCH 1/4] MOBILE-2795 message: Fix context menu icons --- src/addon/messages/pages/discussion/discussion.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/addon/messages/pages/discussion/discussion.ts b/src/addon/messages/pages/discussion/discussion.ts index df944af81..3d1a6d161 100644 --- a/src/addon/messages/pages/discussion/discussion.ts +++ b/src/addon/messages/pages/discussion/discussion.ts @@ -229,6 +229,8 @@ export class AddonMessagesDiscussionPage implements OnDestroy { this.conversationImage = member.profileimageurl; this.title = member.fullname; } + this.blockIcon = this.otherMember && this.otherMember.isblocked ? 'close-circle' : 'checkmark-circle'; + this.addRemoveIcon = this.otherMember && this.otherMember.iscontact ? 'remove' : 'add'; })); } else { this.otherMember = null; @@ -403,7 +405,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy { return this.messagesProvider.invalidateConversation(conversationId).catch(() => { // Ignore errors. }).then(() => { - return this.messagesProvider.getConversation(conversationId); + return this.messagesProvider.getConversation(conversationId, undefined, true); }).catch((error) => { // Get conversation failed, use the fallback one if we have it. if (fallbackConversation) { @@ -422,8 +424,6 @@ export class AddonMessagesDiscussionPage implements OnDestroy { this.favouriteIcon = conversation.isfavourite ? 'fa-star-o' : 'fa-star'; if (!this.isGroup) { this.userId = conversation.userid; - this.blockIcon = this.otherMember && this.otherMember.isblocked ? 'close-circle' : 'checkmark-circle'; - this.addRemoveIcon = this.otherMember && this.otherMember.iscontact ? 'remove' : 'add'; } return true; @@ -1022,7 +1022,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy { this.conversation.isfavourite = !this.conversation.isfavourite; // Get the conversation data so it's cached. Don't block the user for this. - this.messagesProvider.getConversation(this.conversation.id); + this.messagesProvider.getConversation(this.conversation.id, undefined, true); this.eventsProvider.trigger(AddonMessagesProvider.UPDATE_CONVERSATION_LIST_EVENT, { conversationId: this.conversation.id, From 804be94b6fe86979aa366a1e80f091f47af05e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 20 Dec 2018 15:55:18 +0100 Subject: [PATCH 2/4] MOBILE-2795 message: Show online info on messages --- .../addon-messages-confirmed-contacts.html | 2 +- .../addon-messages-contact-requests.html | 2 +- .../contacts/addon-messages-contacts.html | 2 +- .../discussions/addon-messages-discussions.html | 4 ++-- .../conversation-info/conversation-info.html | 4 ++-- .../pages/conversation-info/conversation-info.ts | 2 +- .../messages/pages/discussion/discussion.html | 6 +++--- .../messages/pages/discussion/discussion.scss | 4 ++++ src/addon/messages/pages/discussion/discussion.ts | 2 +- .../group-conversations/group-conversations.html | 4 ++-- src/addon/messages/providers/messages.ts | 3 ++- src/assets/img/group-avatar.png | Bin 0 -> 972 bytes src/components/user-avatar/user-avatar.scss | 5 +++++ src/components/user-avatar/user-avatar.ts | 7 +++++-- 14 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 src/assets/img/group-avatar.png diff --git a/src/addon/messages/components/confirmed-contacts/addon-messages-confirmed-contacts.html b/src/addon/messages/components/confirmed-contacts/addon-messages-confirmed-contacts.html index ac2436fa6..ccd7bd268 100644 --- a/src/addon/messages/components/confirmed-contacts/addon-messages-confirmed-contacts.html +++ b/src/addon/messages/components/confirmed-contacts/addon-messages-confirmed-contacts.html @@ -5,7 +5,7 @@ - +

diff --git a/src/addon/messages/components/contact-requests/addon-messages-contact-requests.html b/src/addon/messages/components/contact-requests/addon-messages-contact-requests.html index 1ae936283..b3bffbf68 100644 --- a/src/addon/messages/components/contact-requests/addon-messages-contact-requests.html +++ b/src/addon/messages/components/contact-requests/addon-messages-contact-requests.html @@ -5,7 +5,7 @@ - +

{{ 'addon.messages.wouldliketocontactyou' | translate }}

diff --git a/src/addon/messages/components/contacts/addon-messages-contacts.html b/src/addon/messages/components/contacts/addon-messages-contacts.html index 29c6853f6..009412aba 100644 --- a/src/addon/messages/components/contacts/addon-messages-contacts.html +++ b/src/addon/messages/components/contacts/addon-messages-contacts.html @@ -19,7 +19,7 @@ - +

diff --git a/src/addon/messages/components/discussions/addon-messages-discussions.html b/src/addon/messages/components/discussions/addon-messages-discussions.html index dfe099c1a..0d4a834aa 100644 --- a/src/addon/messages/components/discussions/addon-messages-discussions.html +++ b/src/addon/messages/components/discussions/addon-messages-discussions.html @@ -13,7 +13,7 @@ {{ search.results.length }} - +

@@ -21,7 +21,7 @@ - +

diff --git a/src/addon/messages/pages/conversation-info/conversation-info.html b/src/addon/messages/pages/conversation-info/conversation-info.html index b85f694a7..36af28369 100644 --- a/src/addon/messages/pages/conversation-info/conversation-info.html +++ b/src/addon/messages/pages/conversation-info/conversation-info.html @@ -15,8 +15,8 @@ -
- +
+

diff --git a/src/addon/messages/pages/conversation-info/conversation-info.ts b/src/addon/messages/pages/conversation-info/conversation-info.ts index cd2d3dd5f..b79ece62b 100644 --- a/src/addon/messages/pages/conversation-info/conversation-info.ts +++ b/src/addon/messages/pages/conversation-info/conversation-info.ts @@ -56,7 +56,7 @@ export class AddonMessagesConversationInfoPage implements OnInit { */ protected fetchData(): Promise { // Get the conversation data first. - return this.messagesProvider.getConversation(this.conversationId, false, false, 0, 0).then((conversation) => { + return this.messagesProvider.getConversation(this.conversationId, false, true, 0, 0).then((conversation) => { this.conversation = conversation; // Now get the members. diff --git a/src/addon/messages/pages/discussion/discussion.html b/src/addon/messages/pages/discussion/discussion.html index dbda39413..8eacd2b4c 100644 --- a/src/addon/messages/pages/discussion/discussion.html +++ b/src/addon/messages/pages/discussion/discussion.html @@ -1,9 +1,9 @@ - - - + + + diff --git a/src/addon/messages/pages/discussion/discussion.scss b/src/addon/messages/pages/discussion/discussion.scss index abab2f8e4..ed24ee525 100644 --- a/src/addon/messages/pages/discussion/discussion.scss +++ b/src/addon/messages/pages/discussion/discussion.scss @@ -5,6 +5,10 @@ $item-message-note-font-size: 75% !default; $item-message-mine-bg: $gray-light !default; ion-app.app-root page-addon-messages-discussion { + .toolbar-title { + padding: 0; + } + ion-content { background-color: $gray-lighter !important; } diff --git a/src/addon/messages/pages/discussion/discussion.ts b/src/addon/messages/pages/discussion/discussion.ts index 3d1a6d161..03b442b54 100644 --- a/src/addon/messages/pages/discussion/discussion.ts +++ b/src/addon/messages/pages/discussion/discussion.ts @@ -393,7 +393,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy { if (conversationId) { promise = Promise.resolve(conversationId); } else { - promise = this.messagesProvider.getConversationBetweenUsers(userId).then((conversation) => { + promise = this.messagesProvider.getConversationBetweenUsers(userId, undefined, true).then((conversation) => { fallbackConversation = conversation; return conversation.id; diff --git a/src/addon/messages/pages/group-conversations/group-conversations.html b/src/addon/messages/pages/group-conversations/group-conversations.html index a6a5df814..5452f9ebb 100644 --- a/src/addon/messages/pages/group-conversations/group-conversations.html +++ b/src/addon/messages/pages/group-conversations/group-conversations.html @@ -81,8 +81,8 @@
- - + + diff --git a/src/addon/messages/providers/messages.ts b/src/addon/messages/providers/messages.ts index b2e26ccbd..7b5cfe940 100644 --- a/src/addon/messages/providers/messages.ts +++ b/src/addon/messages/providers/messages.ts @@ -809,7 +809,8 @@ export class AddonMessagesProvider { conversationid: conversationId, limitfrom: limitFrom, limitnum: limitTo < 1 ? limitTo : limitTo + 1, // If there is a limit, get 1 more than requested. - includecontactrequests: includeContactRequests ? 1 : 0 + includecontactrequests: includeContactRequests ? 1 : 0, + includeprivacyinfo: 1, }; return site.read('core_message_get_conversation_members', params, preSets).then((members) => { diff --git a/src/assets/img/group-avatar.png b/src/assets/img/group-avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..2e336c95ca87f61a6fa1309231e138b520c8a771 GIT binary patch literal 972 zcmV;-12g=IP)+J08?(XjO z_4V`f^X28`-QC^l>gws~>Ez_(i_vXf0000LbW%=J0RR90|NsC0|NsC0|NsC0|NsC0 z|4^{{F8}}l32;bRa{vH2T>t<%T>(QO5DEYQ0|iM$K~#90?U~zxs~`+TM*&4ts-5}& zZ#~{>B^L;tp3V#Vtu?STge2%!^#OeqNP!ecffPuA{8vb=v@u%M={b^?9HeQ@p|*)5 z1eOe>w&s+LK8(bYhIA%S$1_BhB*fWpsC67eW=TSN1JrX6nI#F)aH!@WGD`~5z>&r< zaU-;(ARQjcEWOY&6VeQWQp3=sEnkH=buNJ(-7g^y4_&7mf^fA1Zz+LPEgab{^LhB^ z&C!-ZNDYThl|$1l6FSOL3aP+dd*YUl+s2k+hzmBEcGXBRj2W?|91?hE@d~l&b~Vs4 z2U5BIh$Y)Q628=n`S6opG8S>wB1?s6V9dM`z8 zzpz<7mtr|Bx?>PEU-XC_#;5dhBTtzf9rU7Y|D$%|OABXR^n zZ)Q&Hi7yU`G(wq=5`jc|6iVcwAq9!FjkJi?F$u}^7HTF%5ZqEEgnBvwBrCR7@$tn% zB6Xb;yX#p9(S)SLzD!~vS=)UVyHi*Q+o14b-zEJmggNiN7ZPc*IkD;fZy}LRp3|5O z`N+b5WS@K_t>iBXY)&PRIdUAOWM3&-xhXR8u07TgH5nyE$G%O(Kho5~W}=OMWl4Pr udbGGvMSD~M= time; } else { - return this.user.isonline; + // You have to have Internet access first. + return this.user.isonline && this.appProvider.isOnline(); } } From 45327087a17a76973e63505b2f282a00d99dad64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 20 Dec 2018 16:56:05 +0100 Subject: [PATCH 3/4] MOBILE-2795 ux: Fix Android 4.4 toolbar title buttons width --- src/app/app.md.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/app.md.scss b/src/app/app.md.scss index ef972d724..c718b691c 100644 --- a/src/app/app.md.scss +++ b/src/app/app.md.scss @@ -80,4 +80,8 @@ ion-app.app-root.md { color: $core-color; } } +} + +.platform-android4_4 .bar-buttons-md { + display: flex; } \ No newline at end of file From 3968e415ac33aedd3fb3b46c3af3ec1c79c065a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 20 Dec 2018 17:10:05 +0100 Subject: [PATCH 4/4] MOBILE-2795 messages: Style delete message buttons --- src/addon/messages/pages/discussion/discussion.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/addon/messages/pages/discussion/discussion.scss b/src/addon/messages/pages/discussion/discussion.scss index ed24ee525..7451d99e1 100644 --- a/src/addon/messages/pages/discussion/discussion.scss +++ b/src/addon/messages/pages/discussion/discussion.scss @@ -120,6 +120,7 @@ ion-app.app-root page-addon-messages-discussion { -ms-flex-item-align: end; align-self: flex-end; vertical-align: middle; + @include float('end'); .icon { font-size: 1.4em;