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

Commit

Permalink
Merge pull request #410 from ArkEcosystem/bug/fix-adding-contact
Browse files Browse the repository at this point in the history
Fix Add Contact
  • Loading branch information
luciorubeens committed Nov 17, 2017
2 parents 95763f5 + cf952c0 commit 82acc3e
Showing 1 changed file with 4 additions and 5 deletions.
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

0 comments on commit 82acc3e

Please sign in to comment.