Fix SyncId type hint & remove debug prints
This commit is contained in:
parent
7048a0ac08
commit
f4dca1c2c9
|
@ -4,4 +4,4 @@
|
||||||
|
|
||||||
from typing import Tuple, Union
|
from typing import Tuple, Union
|
||||||
|
|
||||||
SyncId = Union[str, Tuple[str]]
|
SyncId = Union[str, Tuple[str, ...]]
|
||||||
|
|
|
@ -31,8 +31,7 @@ class ModelStore(UserDict):
|
||||||
if is_tuple and len(key) == 3 and key[2] == "filtered_members":
|
if is_tuple and len(key) == 3 and key[2] == "filtered_members":
|
||||||
model = FilteredMembers(user_id=key[0], room_id=key[1])
|
model = FilteredMembers(user_id=key[0], room_id=key[1])
|
||||||
else:
|
else:
|
||||||
model = Model(sync_id=key)
|
model = Model(sync_id=key) # type: ignore
|
||||||
print( key, model)
|
|
||||||
|
|
||||||
self.data[key] = model
|
self.data[key] = model
|
||||||
return model
|
return model
|
||||||
|
|
|
@ -72,7 +72,6 @@ QtObject {
|
||||||
|
|
||||||
function onModelItemDeleted(syncId, index, count=1) {
|
function onModelItemDeleted(syncId, index, count=1) {
|
||||||
// print("delete", syncId, index, count)
|
// print("delete", syncId, index, count)
|
||||||
print(syncId, index, count)
|
|
||||||
ModelStore.get(syncId).remove(index, count)
|
ModelStore.get(syncId).remove(index, count)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user