fix(CommunityPermissionsSettingsPanel): fixing duplicates detection and permission updating
It's integral part of https://github.com/status-im/status-desktop/pull/10166 but not pushed together by mistake.
This commit is contained in:
parent
ac01824ad5
commit
9f3d3514af
|
@ -213,8 +213,11 @@ SettingsPageLayout {
|
|||
|
||||
const same = (a, b) => ModelUtils.checkEqualitySet(a, b, ["key"])
|
||||
|
||||
if (holdings.rowCount() === 0 && dirtyValues.holdingsRequired)
|
||||
continue
|
||||
if (holdings.rowCount() === 0)
|
||||
if (dirtyValues.holdingsRequired)
|
||||
continue
|
||||
else
|
||||
return true
|
||||
|
||||
if (holdings.rowCount() !== 0 && !dirtyValues.holdingsRequired)
|
||||
continue
|
||||
|
@ -269,9 +272,11 @@ SettingsPageLayout {
|
|||
target: d
|
||||
|
||||
function onSaveChanges() {
|
||||
const holdings = ModelUtils.modelToArray(
|
||||
dirtyValues.selectedHoldingsModel,
|
||||
["key", "type", "amount"])
|
||||
const holdings = dirtyValues.holdingsRequired ?
|
||||
ModelUtils.modelToArray(
|
||||
dirtyValues.selectedHoldingsModel,
|
||||
["key", "type", "amount"])
|
||||
: []
|
||||
|
||||
const channels = ModelUtils.modelToArray(
|
||||
dirtyValues.selectedChannelsModel, ["key"])
|
||||
|
|
Loading…
Reference in New Issue