Skip to content

Commit ccc9c86

Browse files
committed
fix: Account#setData was broken
1 parent a825f2f commit ccc9c86

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

ios/App/PrivacyInfo.xcprivacy

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSPrivacyAccessedAPITypes</key>
6+
<array>
7+
<dict>
8+
<key>NSPrivacyAccessedAPIType</key>
9+
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
10+
<key>NSPrivacyAccessedAPITypeReasons</key>
11+
<array>
12+
<string>CA92.1</string>
13+
</array>
14+
</dict>
15+
</array>
16+
</dict>
17+
</plist>

src/lib/Account.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ export default class Account {
127127

128128
async setData(data:Partial<IAccountData>):Promise<void> {
129129
await dataLock.acquire(this.id, async() => {
130-
data = {...this.server.getData(), data}
131-
await this.storage.setAccountData(data, null)
132-
this.server.setData(data)
130+
const d = {...this.server.getData(), ...data}
131+
await this.storage.setAccountData(d, null)
132+
this.server.setData(d)
133133
})
134134
}
135135

0 commit comments

Comments
 (0)