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
1=== modified file 'components/TelegramContactsListItem.qml'
2--- components/TelegramContactsListItem.qml 2015-02-04 18:32:33 +0000
3+++ components/TelegramContactsListItem.qml 2015-02-18 14:36:17 +0000
4@@ -5,20 +5,18 @@
5 import "TelegramColors.js" as TelegramColors
6
7 ListItemWithActions {
8+ id: listitem
9
10 property alias image: image.source
11 property alias title: title.text
12 property string lastSeen
13 property bool isOnline: false
14- property bool selected: false
15+ showDivider: true
16
17- id: listitem
18 width: parent.width
19 height: units.gu(8)
20
21- color: listitem.selected ? TelegramColors.blue
22- : listitem.pressed ? TelegramColors.list_pressed
23- : TelegramColors.white
24+ color: listitem.pressed ? TelegramColors.list_pressed : TelegramColors.white
25
26 UbuntuShape {
27 id: imageShape
28@@ -79,17 +77,6 @@
29 elide: Text.ElideRight
30 }
31
32- ListItem.ThinDivider {
33- id: divider
34- anchors {
35- bottom: parent.bottom
36- left: parent.left
37- leftMargin: units.gu(2)
38- right: parent.right
39- rightMargin: units.gu(2)
40- }
41- }
42-
43 onLastSeenChanged: updateLastSeen(lastSeen)
44
45 onIsOnlineChanged: updateLastSeen(lastSeen)
46
47=== modified file 'ui/ContactsPage.qml'
48--- ui/ContactsPage.qml 2015-02-04 18:32:33 +0000
49+++ ui/ContactsPage.qml 2015-02-18 14:36:17 +0000
50@@ -60,6 +60,7 @@
51 return i18n.tr("Contacts");
52 }
53 }
54+ pageSubtitle: ""
55
56 head.actions: {
57 if (isSearching) {
58@@ -105,13 +106,13 @@
59 id: groupChatTitleTextField
60 anchors {
61 top: parent.top
62- topMargin: units.gu(1)
63+ topMargin: isVisible ? units.gu(1) : 0
64 left: parent.left
65 leftMargin: units.gu(1)
66 right: parent.right
67 rightMargin: units.gu(1)
68 }
69- height: isVisible ? units.gu(5) : 0
70+ height: isVisible ? units.gu(4) : 0
71 opacity: isVisible ? 1.0 : 0.0
72 placeholderText: i18n.tr("Chat title")
73
74@@ -131,7 +132,6 @@
75 left: parent.left
76 right: parent.right
77 bottom: parent.bottom
78- bottomMargin: units.dp(4)
79 }
80
81 clip: true
82@@ -155,6 +155,7 @@
83 lastSeen: model.lastSeenOnline > 0 ? Time.formatLastSeen(model.lastSeenOnline * 1000) : ""
84 isOnline: model.online
85 selected: contactListView.isSelected(contactDelegate)
86+ selectionMode: groupChatMode
87
88 onItemClicked: {
89 if (contactListView.isInSelectionMode) {
90@@ -193,8 +194,8 @@
91 }
92
93 function refreshSubtitle() {
94- if (groupChatMode) {
95- var count = contactListView.selectedItems.count;
96+ var count = contactListView.selectedItems.count;
97+ if (groupChatMode && count > 0) {
98 var maxMembers = 200;
99 // TRANSLATORS: the first argument refers to the number of members
100 // on a group conversation. The second one refers to the maximum
101@@ -219,6 +220,7 @@
102 contactParser.vCardUrl = url;
103 }
104 }
105+
106 Component {
107 id: contactImportDialogComponent
108 Dialog {

Subscribers

People subscribed via source and target branches

to all changes: