hide border for last tx in group

This commit is contained in:
Marty Alcala 2016-11-04 13:29:19 -04:00
commit ccdad2c6e4
3 changed files with 14 additions and 3 deletions

View file

@ -157,7 +157,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
return date;
};
$scope.showGroupHeader = function(index) {
$scope.isFirstInGroup = function(index) {
if(index === 0) {
return true;
}
@ -166,6 +166,13 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
return !createdDuringSameMonth(curTx, prevTx);
};
$scope.isLastInGroup = function(index) {
if(index === $scope.txHistory.length - 1) {
return true;
}
return $scope.isFirstInGroup(index + 1);
};
function createdDuringSameMonth(tx1, tx2) {
var date1 = new Date(tx1.time * 1000);
var date2 = new Date(tx2.time * 1000);