Merge lp:~libqtelegram-team/telegram-app/app-dev-fix-1423154 into lp:telegram-app/app-dev

Proposed by Giulio Collura
Status: Merged
Approved by: Michał Karnicki
Approved revision: 263
Merged at revision: 261
Proposed branch: lp:~libqtelegram-team/telegram-app/app-dev-fix-1423154
Merge into: lp:telegram-app/app-dev
Diff against target: 108 lines (+10/-21)
2 files modified
components/TelegramContactsListItem.qml (+3/-16)
ui/ContactsPage.qml (+7/-5)
To merge this branch: bzr merge lp:~libqtelegram-team/telegram-app/app-dev-fix-1423154
Reviewer Review Type Date Requested Status
Michał Karnicki (community) Approve
Review via email: mp+250127@code.launchpad.net

Description of the change

Fix bug #1423154, if no contact is selected, don't show group member count label in header.

To post a comment you must log in.
Revision history for this message
Michał Karnicki (karni) :
review: Approve
263. By Giulio Collura

remove useless color code

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components/TelegramContactsListItem.qml'
--- components/TelegramContactsListItem.qml 2015-02-04 18:32:33 +0000
+++ components/TelegramContactsListItem.qml 2015-02-18 14:36:17 +0000
@@ -5,20 +5,18 @@
5import "TelegramColors.js" as TelegramColors5import "TelegramColors.js" as TelegramColors
66
7ListItemWithActions {7ListItemWithActions {
8 id: listitem
89
9 property alias image: image.source10 property alias image: image.source
10 property alias title: title.text11 property alias title: title.text
11 property string lastSeen12 property string lastSeen
12 property bool isOnline: false13 property bool isOnline: false
13 property bool selected: false14 showDivider: true
1415
15 id: listitem
16 width: parent.width16 width: parent.width
17 height: units.gu(8)17 height: units.gu(8)
1818
19 color: listitem.selected ? TelegramColors.blue19 color: listitem.pressed ? TelegramColors.list_pressed : TelegramColors.white
20 : listitem.pressed ? TelegramColors.list_pressed
21 : TelegramColors.white
2220
23 UbuntuShape {21 UbuntuShape {
24 id: imageShape22 id: imageShape
@@ -79,17 +77,6 @@
79 elide: Text.ElideRight77 elide: Text.ElideRight
80 }78 }
8179
82 ListItem.ThinDivider {
83 id: divider
84 anchors {
85 bottom: parent.bottom
86 left: parent.left
87 leftMargin: units.gu(2)
88 right: parent.right
89 rightMargin: units.gu(2)
90 }
91 }
92
93 onLastSeenChanged: updateLastSeen(lastSeen)80 onLastSeenChanged: updateLastSeen(lastSeen)
9481
95 onIsOnlineChanged: updateLastSeen(lastSeen)82 onIsOnlineChanged: updateLastSeen(lastSeen)
9683
=== modified file 'ui/ContactsPage.qml'
--- ui/ContactsPage.qml 2015-02-04 18:32:33 +0000
+++ ui/ContactsPage.qml 2015-02-18 14:36:17 +0000
@@ -60,6 +60,7 @@
60 return i18n.tr("Contacts");60 return i18n.tr("Contacts");
61 }61 }
62 }62 }
63 pageSubtitle: ""
6364
64 head.actions: {65 head.actions: {
65 if (isSearching) {66 if (isSearching) {
@@ -105,13 +106,13 @@
105 id: groupChatTitleTextField106 id: groupChatTitleTextField
106 anchors {107 anchors {
107 top: parent.top108 top: parent.top
108 topMargin: units.gu(1)109 topMargin: isVisible ? units.gu(1) : 0
109 left: parent.left110 left: parent.left
110 leftMargin: units.gu(1)111 leftMargin: units.gu(1)
111 right: parent.right112 right: parent.right
112 rightMargin: units.gu(1)113 rightMargin: units.gu(1)
113 }114 }
114 height: isVisible ? units.gu(5) : 0115 height: isVisible ? units.gu(4) : 0
115 opacity: isVisible ? 1.0 : 0.0116 opacity: isVisible ? 1.0 : 0.0
116 placeholderText: i18n.tr("Chat title")117 placeholderText: i18n.tr("Chat title")
117118
@@ -131,7 +132,6 @@
131 left: parent.left132 left: parent.left
132 right: parent.right133 right: parent.right
133 bottom: parent.bottom134 bottom: parent.bottom
134 bottomMargin: units.dp(4)
135 }135 }
136136
137 clip: true137 clip: true
@@ -155,6 +155,7 @@
155 lastSeen: model.lastSeenOnline > 0 ? Time.formatLastSeen(model.lastSeenOnline * 1000) : ""155 lastSeen: model.lastSeenOnline > 0 ? Time.formatLastSeen(model.lastSeenOnline * 1000) : ""
156 isOnline: model.online156 isOnline: model.online
157 selected: contactListView.isSelected(contactDelegate)157 selected: contactListView.isSelected(contactDelegate)
158 selectionMode: groupChatMode
158159
159 onItemClicked: {160 onItemClicked: {
160 if (contactListView.isInSelectionMode) {161 if (contactListView.isInSelectionMode) {
@@ -193,8 +194,8 @@
193 }194 }
194195
195 function refreshSubtitle() {196 function refreshSubtitle() {
196 if (groupChatMode) {197 var count = contactListView.selectedItems.count;
197 var count = contactListView.selectedItems.count;198 if (groupChatMode && count > 0) {
198 var maxMembers = 200;199 var maxMembers = 200;
199 // TRANSLATORS: the first argument refers to the number of members200 // TRANSLATORS: the first argument refers to the number of members
200 // on a group conversation. The second one refers to the maximum201 // on a group conversation. The second one refers to the maximum
@@ -219,6 +220,7 @@
219 contactParser.vCardUrl = url;220 contactParser.vCardUrl = url;
220 }221 }
221 }222 }
223
222 Component {224 Component {
223 id: contactImportDialogComponent225 id: contactImportDialogComponent
224 Dialog {226 Dialog {

Subscribers

People subscribed via source and target branches

to all changes: