Skip to content

Commit f00edce

Browse files
committed
fix: Remove redundant emits for dataChanged
1 parent 9dd54cc commit f00edce

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/app/modules/main/wallet_section/all_tokens/flat_tokens_model.nim

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ QtObject:
146146
if self.delegate.getFlatTokensList().len > 0:
147147
for marketDetails in self.tokenMarketDetails:
148148
marketDetails.update()
149-
let index = self.createIndex(0, 0, nil)
150-
let lastindex = self.createIndex(self.delegate.getFlatTokensList().len-1, 0, nil)
151-
defer: index.delete
152-
defer: lastindex.delete
153-
self.dataChanged(index, lastindex, @[ModelRole.MarketDetailsLoading.int])
154149

155150
proc tokensMarketValuesUpdated*(self: FlatTokensModel) =
156151
self.marketDetailsDataChanged()

src/app/modules/main/wallet_section/all_tokens/token_by_symbol_model.nim

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,8 @@ QtObject:
151151

152152
proc tokensMarketValuesAboutToUpdate*(self: TokensBySymbolModel) =
153153
if self.delegate.getTokenBySymbolList().len > 0:
154-
let index = self.createIndex(0, 0, nil)
155-
let lastindex = self.createIndex(self.delegate.getTokenBySymbolList().len-1, 0, nil)
156-
defer: index.delete
157-
defer: lastindex.delete
158154
for marketDetails in self.tokenMarketDetails:
159155
marketDetails.update()
160-
self.dataChanged(index, lastindex, @[ModelRole.MarketDetails.int, ModelRole.MarketDetailsLoading.int])
161156

162157
proc tokensDetailsAboutToUpdate*(self: TokensBySymbolModel) =
163158
if self.delegate.getTokenBySymbolList().len > 0:

0 commit comments

Comments
 (0)