Fixed bug: In some (test-)cases Taskbar items order is mixed up.

This commit is contained in:
Thorsten Eckel 2017-04-12 15:52:27 +02:00
parent c3d91a8ce2
commit 021f6f03f8

View file

@ -59,7 +59,7 @@ class Taskbar < ApplicationModel
self.preferences = {}
end
preferences[:tasks] = []
Taskbar.where(key: key).order(:created_at).each { |taskbar|
Taskbar.where(key: key).order(:created_at, :id).each { |taskbar|
if taskbar.id == id
local_changed = state_changed?
local_last_contact = last_contact
@ -86,7 +86,7 @@ class Taskbar < ApplicationModel
end
# update other taskbars
Taskbar.where(key: key).order(:created_at).each { |taskbar|
Taskbar.where(key: key).order(:created_at, :id).each { |taskbar|
next if taskbar.id == id
taskbar.preferences = preferences
taskbar.local_update = true