Ask / Submit
8

Bug: Notes app deletes different note than selected [released]

asked 2014-01-12 20:07:51 +0200

nodevel gravatar image

updated 2014-07-28 11:01:29 +0200

jiit gravatar image

I have discovered the following bug. It is quite annoying, as you can by mistake delete different note than you wanted to.

If you select a note while there is a remorse timer running on a different one, chosing Delete from the pulley menu actually deletes another note, not the one you selected.

How to reproduce:

  1. Create three notes
  2. Long tap on the first one and select Delete
  3. Before the remorse timer finishes, click on the second note
  4. Choose Delete from the pulley menu

Expected outcome:

First two notes get deleted, the 3rd one stays.

What happens instead:

The 1st and the 3rd note get deleted and the 2nd one stays.

EDIT: Looks like it's been fixed in 1.0.8.19.

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by nodevel
close date 2014-07-15 01:13:10.087304

Comments

2

Good catch, seems to indicate that while 'remorse'-timer is running, the user is not able to use the device normally (meaning that the outcome of user+initiated operationso is unpredictable when remorse-timer is ticking). Now, it would be interestingin to know if other apps behave strangly in similar situations. Then this might be a more general problem with remorse-functionality in the SailfishOS.

foss4ever ( 2014-01-12 21:59:51 +0200 )edit

Re-tag: added 'remorse' tag cause the problem nanifested itself during remorse-timer ticking..

foss4ever ( 2014-01-12 22:07:44 +0200 )edit

Yes, that's what I was thinking. I tried Photos and E-mail, but couldn't reproduce the same behavior as in Notes.

nodevel ( 2014-01-12 22:08:57 +0200 )edit

Regarding the re-tagging - thanks, I tried to change the 'important' tag to 'remorsetimer' at least three times, but my internet connection sucks, so I always hit the 'Problem loading page' screen. :)

nodevel ( 2014-01-12 22:10:40 +0200 )edit

Could also add 'data-loss' tag there cause in the worst case this bug might lead important user-data to be lost accidentally.

foss4ever ( 2014-01-12 22:15:07 +0200 )edit

2 Answers

Sort by » oldest newest most voted
3

answered 2014-01-13 04:54:55 +0200

Tanghus gravatar image

updated 2014-01-13 04:55:35 +0200

I got caught by this in my kitchen timer app. The delete function uses the models index to select which note to delete, but if a remorse runs out the index is decremented leading to deletion of the wrong item.

From /usr/share/jolla-notes/qml/OverviewPage.qml

Currently the notes app does:

        function deleteNote() {
            var remorse = remorsecomponent.createObject(view)
            remorse.execute(noteitem, qsTrId("notes-la-deleting"),
                            function() {
                notesModel.deleteNote(index)
                remorse.destroy(1)
            })
        }

But it should cache the index:

        function deleteNote() {
            var remorse = remorsecomponent.createObject(view)
            var idx = index
            remorse.execute(noteitem, qsTrId("notes-la-deleting"),
                            function() {
                notesModel.deleteNote(idx)
                remorse.destroy(1)
            })
        }
edit flag offensive delete publish link more

Comments

Mh, do we have an fix-included tag or similar? So that sailors can harvest low hanging fruits?

Blizzz ( 2014-02-13 17:59:22 +0200 )edit
0

answered 2014-07-15 01:12:55 +0200

nodevel gravatar image

[BUG] "Delete note" from note page can delete wrong note

It should be fixed in 1.0.8.19 Tahkalampi, according to the release notes.

edit flag offensive delete publish link more

Stats

Asked: 2014-01-12 20:07:51 +0200

Seen: 138 times

Last updated: Jul 15 '14