Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Fix Add Contact #410

Merged
merged 2 commits into from
Nov 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
self.save = function () {
storageService.set('contacts', self.contacts)
self.getContacts()
$scope.$apply()
}

self.isAddress = function (address) {
Expand All @@ -48,13 +47,13 @@
self.showToast = function (message, variable, error) {
if (error) {
toastService.error(
gettextCatalog.getString(message) + ' - ' + variable,
gettextCatalog.getString(message) + (variable ? ' - ' + variable : ''),
null,
true
)
} else {
toastService.success(
gettextCatalog.getString(message) + ' - ' + variable,
gettextCatalog.getString(message) + (variable ? ' - ' + variable : ''),
null,
true
)
Expand Down Expand Up @@ -110,7 +109,7 @@

self.contacts.push(newContact)
self.save()
self.showToast('Contact successfully added', name, false)
self.showToast(`Contact '${name}' with address '${address}' added successfully`)
cancel()
}

Expand Down Expand Up @@ -168,7 +167,7 @@
}
}
self.save()
self.showToast('Contact successfully saved', name, false)
self.showToast(`Contact '${name}' with address '${address}' saved successfully`)
cancel()
}

Expand Down