Skip to content
Snippets Groups Projects
Commit bd10e445 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] update for Duniter4j v0.10.3

[fix] fix new message notification (pubkey was hidden when issuer was not a member)
parent da7bc4e1
No related branches found
No related tags found
No related merge requests found
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
"useLocalStorage": true, "useLocalStorage": true,
"useRelative": true, "useRelative": true,
"expertMode": true, "expertMode": true,
"decimalCount": 2,
"helptip": { "helptip": {
"enable": false, "enable": false,
"installDocUrl": { "installDocUrl": {
......
...@@ -778,10 +778,13 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $ ...@@ -778,10 +778,13 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $
}); });
}; };
$scope.doAction = function(action) { $scope.doAction = function(action, options) {
if (action == 'certify') { if (action == 'certify') {
return $scope.certify(); return $scope.certify();
} }
if (action == 'transfer') {
$scope.showTransferModal(options);
}
}; };
/* -- open screens -- */ /* -- open screens -- */
......
...@@ -106,7 +106,6 @@ function ESBlockLookupController($scope, $state, $controller, $ionicPopover, UIU ...@@ -106,7 +106,6 @@ function ESBlockLookupController($scope, $state, $controller, $ionicPopover, UIU
"number": "desc" "number": "desc"
}; };
} }
request.excludeCurrent = true;
promise = esBlockchain.block.search($scope.currency, request); promise = esBlockchain.block.search($scope.currency, request);
} }
...@@ -122,7 +121,6 @@ function ESBlockLookupController($scope, $state, $controller, $ionicPopover, UIU ...@@ -122,7 +121,6 @@ function ESBlockLookupController($scope, $state, $controller, $ionicPopover, UIU
else { // default sort else { // default sort
request.sort = "number:desc"; request.sort = "number:desc";
} }
request.excludeCurrent = false;
promise = esBlockchain.block.searchText($scope.currency, $scope.search.text, request); promise = esBlockchain.block.searchText($scope.currency, $scope.search.text, request);
} }
......
...@@ -45,12 +45,16 @@ function NotificationsController($scope, $rootScope, $ionicPopover, $state, $tim ...@@ -45,12 +45,16 @@ function NotificationsController($scope, $rootScope, $ionicPopover, $state, $tim
$scope.$on('$ionicView.enter', function() { $scope.$on('$ionicView.enter', function() {
if ($scope.search.loading) { if ($scope.search.loading) {
$scope.load(); $scope.loadWallet({minData: true})
.then(function() {
// Reset unread counter $scope.load();
$timeout(function() { UIUtils.loading.hide();
$scope.resetUnreadCount();
}, 1000); // Reset unread counter
return $timeout(function() {
$scope.resetUnreadCount();
}, 1000);
});
} }
}); });
......
...@@ -47,7 +47,7 @@ angular.module('cesium.es.blockchain.services', ['cesium.services', 'cesium.es.h ...@@ -47,7 +47,7 @@ angular.module('cesium.es.blockchain.services', ['cesium.services', 'cesium.es.h
exports.raw.block.processSearchResult = function(res, options) { exports.raw.block.processSearchResult = function(res, options) {
options = options || {}; options = options || {};
options.excludeCurrent = angular.isDefined(options.excludeCurrent) ? options.excludeCurrent : false; options.excludeCurrent = angular.isDefined(options.excludeCurrent) ? options.excludeCurrent : true;
options.fillAvatar = angular.isDefined(options.fillAvatar) ? options.fillAvatar : true; options.fillAvatar = angular.isDefined(options.fillAvatar) ? options.fillAvatar : true;
options.cleanData = angular.isDefined(options.cleanData) ? options.cleanData : true; options.cleanData = angular.isDefined(options.cleanData) ? options.cleanData : true;
......
...@@ -94,11 +94,16 @@ angular.module('cesium.es.message.services', ['ngResource', 'cesium.services', ' ...@@ -94,11 +94,16 @@ angular.module('cesium.es.message.services', ['ngResource', 'cesium.services', '
console.debug("[ES] [message] detected new message (from notification service)"); console.debug("[ES] [message] detected new message (from notification service)");
var notification = new Notification(event); var notification = new Notification(event);
notification.issuer = notification.pubkey;
delete notification.pubkey;
csWot.extendAll([notification]) csWot.extend(notification, 'issuer')
.then(function() { .then(function() {
csWallet.data.messages = csWallet.data.messages || {}; csWallet.data.messages = csWallet.data.messages || {};
csWallet.data.messages.unreadCount++; csWallet.data.messages.unreadCount++;
// Raise event // Raise event
api.data.raise.new(notification); api.data.raise.new(notification);
}); });
......
...@@ -15,8 +15,8 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. ...@@ -15,8 +15,8 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es.
block: { block: {
search: esHttp.post('/:currency/block/_search') search: esHttp.post('/:currency/block/_search')
}, },
blockStat: { blockstat: {
search: esHttp.post('/:currency/blockStat/_search?pretty') search: esHttp.post('/:currency/blockstat/_search?pretty')
} }
}, },
regex: { regex: {
...@@ -302,7 +302,7 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. ...@@ -302,7 +302,7 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es.
if (jobs.length < 10) { if (jobs.length < 10) {
jobs.push( jobs.push(
exports.raw.blockStat.search(request, {currency: currency}) exports.raw.blockstat.search(request, {currency: currency})
.then(function (res) { .then(function (res) {
var aggs = res.aggregations; var aggs = res.aggregations;
if (!aggs.tx || !aggs.tx.buckets || !aggs.tx.buckets.length) return; if (!aggs.tx || !aggs.tx.buckets || !aggs.tx.buckets.length) return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment