Skip to content

Commit

Permalink
Add wait cursor when searching for new people..
Browse files Browse the repository at this point in the history
With many faces, the interface becomes especially slow and confuses
users.
  • Loading branch information
matiasdelellis committed Nov 5, 2024
1 parent f346e28 commit 2ce5b27
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/personal.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,10 @@ View.prototype = {
});

$('#show-more-clusters').click(function () {
let button = $(this);
button.css("cursor", "wait");
self._persons.loadUnassignedClusters().done(function () {
button.css("cursor", "");
if (self._persons.getUnassignedClusters().length > 0) {
self.renameUnassignedClusterDialog();
} else {
Expand All @@ -421,7 +424,10 @@ View.prototype = {
});

$('#show-ignored-clusters').click(function () {
let button = $(this);
button.css("cursor", "wait");
self._persons.loadIgnoredClusters().done(function () {
button.css("cursor", "");
if (self._persons.getIgnoredClusters().length > 0) {
self.renameIgnoredClusterDialog();
} else {
Expand Down Expand Up @@ -541,16 +547,6 @@ View.prototype = {
});
});

$('#facerecognition #show-ignored-clusters').click(function () {
$(this).css("cursor", "wait");
var person = self._persons.getActivePerson();
self._persons.loadClustersByName(person.name).done(function () {
self.renderContent();
}).fail(function () {
OC.Notification.showTemporary(t('facerecognition', 'There was an error when trying to find photos of your friend'));
});
});

$('#facerecognition .icon-back').click(function () {
self._persons.unsetActive();
self.renderContent();
Expand Down

0 comments on commit 2ce5b27

Please sign in to comment.