[Merge] lp:~renatofilho/address-book-app/improve-vcard-import into lp:address-book-app
Arthur Mello
arthur.mello at canonical.com
Wed Nov 25 12:40:02 UTC 2015
Diff comments:
> === modified file 'src/imports/ABContactListPage.qml'
> --- src/imports/ABContactListPage.qml 2015-11-24 00:30:20 +0000
> +++ src/imports/ABContactListPage.qml 2015-11-24 18:18:47 +0000
> @@ -106,13 +108,19 @@
>
> function importContact(urls)
> {
> - if (urls.length > 0) {
> - var importDialog = Qt.createQmlObject("VCardImportDialog{}",
> - mainPage,
> - "VCardImportDialog")
> - if (importDialog) {
> - importDialog.importVCards(contactList.listModel, urls)
> - }
> + mainPage._busyDialog = PopupUtils.open(busyDialogComponent, mainPage)
> +
> + var importing = false
> + for(var i=0, iMax=urls.length; i < iMax; i++) {
> + var url = urls[i]
> + if (url && url != "")
> + importing = true
> + contactList.listModel.importContacts(url)
Missing brackets
> + }
> +
> + if (!importing) {
> + PopupUtils.close(mainPage._busyDialog)
> + mainPage._busyDialog = null
> }
> }
>
> @@ -428,6 +437,53 @@
> detailToPick: -1
> showAddNewButton: true
> }
> + PropertyChanges {
> + target: bottomEdge
> + enabled: false
> + }
> + },
> + PageHeadState {
> + id: varctImportedState
Shouldn't be vcardImportedState?
> +
> + name: "vcardImported"
> + backAction: Action {
> + iconName: "back"
> + text: i18n.tr("Back")
> + onTriggered: {
> + contactList.forceActiveFocus()
> + mainPage.state = "default"
> + importedIdsFilter.ids = []
> + }
> + }
> + PropertyChanges {
> + target: mainPage.head
> + backAction: varctImportedState.backAction
> + }
> + PropertyChanges {
> + target: bottomEdge
> + enabled: false
> + }
> + PropertyChanges {
> + target: mainPage
> + title: i18n.tr("Imported contacts")
> + }
> + }
> + ]
> +
> + //WORKAROUND: we need to call 'changeFilter' manually to make sure that the model will be cleared
> + // before update it with the new model. This is faster than do a match of contacts
> + transitions: [
> + Transition {
> + from: "vcardImported"
> + ScriptAction {
> + script: contactList.listModel.changeFilter(null)
> + }
> + },
> + Transition {
> + to: "vcardImported"
> + ScriptAction {
> + script: contactList.listModel.changeFilter(importedIdsFilter)
> + }
> }
> ]
>
--
https://code.launchpad.net/~renatofilho/address-book-app/improve-vcard-import/+merge/278165
Your team Ubuntu Phablet Team is requested to review the proposed merge of lp:~renatofilho/address-book-app/improve-vcard-import into lp:address-book-app.
More information about the Ubuntu-reviews
mailing list