Merge lp:~tiagosh/messaging-app/fix-1414675 into lp:messaging-app

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 297
Merged at revision: 299
Proposed branch: lp:~tiagosh/messaging-app/fix-1414675
Merge into: lp:messaging-app
Diff against target: 42 lines (+20/-3)
1 file modified
src/qml/ThreadDelegate.qml (+20/-3)
To merge this branch: bzr merge lp:~tiagosh/messaging-app/fix-1414675
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+247624@code.launchpad.net

Commit message

Generate filters dynamically using a UnionFilter with all grouped threads.

Description of the change

Generate filters dynamically using a UnionFilter with all grouped threads.

--Checklist--
Are there any related MPs required for this MP to build/function as expected? Please list.
No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/messaging-app) on device or emulator?
Yes

If you changed the UI, was the change specified/approved by design?
N/A

If you changed UI labels, did you update the pot file?
N/A

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes

Did CI run pass? If not, please explain why.
No, but not related to the changes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

Code looks good and works as expected!

review: Approve
298. By Tiago Salem Herrmann

change filters to make it more reliable

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/qml/ThreadDelegate.qml'
--- src/qml/ThreadDelegate.qml 2015-01-21 13:21:45 +0000
+++ src/qml/ThreadDelegate.qml 2015-01-27 13:50:23 +0000
@@ -218,11 +218,18 @@
218 property alias contexts: phoneDetail.contexts218 property alias contexts: phoneDetail.contexts
219 property bool isUnknown: contactId === ""219 property bool isUnknown: contactId === ""
220 property string phoneNumberSubTypeLabel: ""220 property string phoneNumberSubTypeLabel: ""
221 property var searchHistoryFilter: HistoryIntersectionFilter {221 property string latestFilter: ""
222 HistoryFilter { filterProperty: "threadId"; filterValue: model.threadId }222 property var searchHistoryFilter
223 HistoryFilter { filterProperty: "accountId"; filterValue: model.accountId }223 property var searchHistoryFilterString: 'import Ubuntu.History 0.1;
224 HistoryUnionFilter {
225 %1
226 }'
227 property var searchIntersectionFilter: 'HistoryIntersectionFilter {
228 HistoryFilter { filterProperty: "accountId"; filterValue: \'%1\' }
229 HistoryFilter { filterProperty: "threadId"; filterValue: \'%2\' }
224 HistoryFilter { filterProperty: "message"; filterValue: searchTerm; matchFlags: HistoryFilter.MatchContains }230 HistoryFilter { filterProperty: "message"; filterValue: searchTerm; matchFlags: HistoryFilter.MatchContains }
225 }231 }
232 '
226233
227 function updateSearch() {234 function updateSearch() {
228 var found = false235 var found = false
@@ -232,6 +239,16 @@
232 || (!unknownContact && delegateHelper.alias.toLowerCase().search(searchTermLowerCase) !== -1)) {239 || (!unknownContact && delegateHelper.alias.toLowerCase().search(searchTermLowerCase) !== -1)) {
233 found = true240 found = true
234 } else {241 } else {
242 var componentFilters = ""
243 for(var i in model.threads) {
244 componentFilters += searchIntersectionFilter.arg(model.threads[i].accountId).arg(model.threads[i].threadId)
245 }
246 var finalString = searchHistoryFilterString.arg(componentFilters)
247 if (finalString !== latestFilter) {
248 delegateHelper.searchHistoryFilter = Qt.createQmlObject(finalString, searchEventModelLoader)
249 latestFilter = finalString
250 }
251
235 searchEventModelLoader.active = true252 searchEventModelLoader.active = true
236 }253 }
237 } else {254 } else {

Subscribers

People subscribed via source and target branches