Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event list incorrect after deleting first event in the list #651

Closed
neillbell opened this issue Jun 15, 2018 · 1 comment
Closed

Event list incorrect after deleting first event in the list #651

neillbell opened this issue Jun 15, 2018 · 1 comment
Labels

Comments

@neillbell
Copy link
Contributor

Platform & OS Version
Linux x64 & Ubuntu 16.04

The version of the app you are reporting:
1.3.007D

Device details:
Desktop

What is the nature of your issue
Bug

Details
When viewing the event list, deleting the first event does not cause the event to be removed from the display. Attempting to delete the event a second time generates a "could not delete event" error. Reloading causes the event list to appear as expected. This does not happen for events other than the first.

Looks like a simple error in the code. Here's a diff.

diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index dbf255b..81bf4cb 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -1694,7 +1694,7 @@ angular.module('zmApp.controllers')
               noBackdrop: true,
               duration: 1000
             });
-            if (itemid > 0) $scope.events.splice(itemid, 1);
+            if (itemid >= 0) $scope.events.splice(itemid, 1);
 
           }

@pliablepixels
Copy link
Member

Thanks! If you are comfortable doing PRs feel free to submit PRs for all of these - I'll patch this one in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants