show complete history and optimize toast message
This commit is contained in:
parent
71fd35f7c1
commit
9e439e8543
1 changed files with 15 additions and 8 deletions
|
|
@ -923,15 +923,20 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.startSearch = function(){
|
self.startSearch = function(){
|
||||||
self.isSearching = true;
|
self.isSearching = true;
|
||||||
self.txHistoryToList = [];
|
self.txHistoryToList = [];
|
||||||
|
if(self.historyShowShowAll) self.txHistory = self.completeHistory;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.cancelSearch = function(){
|
self.cancelSearch = function(){
|
||||||
self.isSearching = false
|
self.isSearching = false;
|
||||||
self.txHistoryToList = self.txHistory;
|
if(self.txHistory.length > self.historyShowLimit)
|
||||||
|
self.txHistoryToList = self.txHistory.slice(0, self.historyShowLimit);
|
||||||
|
else self.txHistoryToList = self.txHistory;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.updateSearchInput = function(search){
|
self.updateSearchInput = function(search){
|
||||||
self.search = search;
|
self.search = search;
|
||||||
|
if (isCordova)
|
||||||
|
window.plugins.toast.hide();
|
||||||
self.throttleSearch();
|
self.throttleSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -955,15 +960,17 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
lodash.includes(tx.addressTo, search) ||
|
lodash.includes(tx.addressTo, search) ||
|
||||||
lodash.isEqual(formatDate(new Date(tx.time * 1000)), search);
|
lodash.isEqual(formatDate(new Date(tx.time * 1000)), search);
|
||||||
});
|
});
|
||||||
if (isCordova)
|
|
||||||
window.plugins.toast.showShortBottom(gettextCatalog.getString('Matches: ' + result.length));
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.txHistoryToList = filter(self.search);
|
self.txHistoryToList = filter(self.search);
|
||||||
$timeout(function() {
|
if (isCordova)
|
||||||
$rootScope.$apply();
|
window.plugins.toast.showShortBottom(gettextCatalog.getString('Matches: ' + self.txHistoryToList.length));
|
||||||
});
|
|
||||||
|
$timeout(function() {
|
||||||
|
$rootScope.$apply();
|
||||||
|
});
|
||||||
|
|
||||||
},1000);
|
},1000);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue