mirror of
				https://github.com/kepler155c/opus
				synced 2025-10-30 23:23:03 +00:00 
			
		
		
		
	storage activity wrong amounts
This commit is contained in:
		| @@ -78,7 +78,7 @@ function page:eventHandler(event) | ||||
|         title = t.label, | ||||
|       }) | ||||
|     elseif event.type == 'trust' then | ||||
|       shell.run('trust ' .. t.id) | ||||
|       shell.openTab('trust ' .. t.id) | ||||
|     elseif event.type == 'reboot' then | ||||
|       sendCommand(t.id, 'reboot') | ||||
|     elseif event.type == 'shutdown' then | ||||
|   | ||||
| @@ -100,7 +100,11 @@ function changedPage:eventHandler(event) | ||||
|  | ||||
|   return true | ||||
| end | ||||
|   | ||||
|  | ||||
| local function uniqueKey(item) | ||||
|   return table.concat({ item.name, item.damage, item.nbtHash }, ':') | ||||
| end | ||||
|  | ||||
| function changedPage:refresh() | ||||
|   local t = storage:listItems('all') | ||||
|   | ||||
| @@ -122,8 +126,7 @@ function changedPage:refresh() | ||||
|     for _,v in pairs(self.lastItems) do | ||||
|       found = false | ||||
|       for k2,v2 in pairs(t) do | ||||
|         if v.id == v2.id and | ||||
|            v.dmg == v2.dmg then | ||||
|         if uniqueKey(v) == uniqueKey(v2) then | ||||
|           if v.qty ~= v2.qty then | ||||
|             local c = Util.shallowCopy(v2) | ||||
|             c.lastQty = v.qty | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 kepler155c@gmail.com
					kepler155c@gmail.com