Each attachment-to-be-removed may have a different model object representing the message, and there may have also been previous deletions without refreshing these models. So asking whether the message has any attachments left might give an out-of-date answer. Fix this by doing an explicit database query to count remaining attachments, and refreshing the message model before deletion if necessary. |
||
|---|---|---|
| .. | ||
| AudioFiles | ||
| Images.xcassets | ||
| Lottie | ||
| NSE-Images.xcassets | ||
| Settings.bundle | ||
| Sounds | ||
| src | ||
| test | ||
| translations | ||
| .swiftlint.yml | ||
| iTunesArtwork@3x.png | ||
| main.m | ||
| Signal-AppStore.entitlements | ||
| Signal-Info.plist | ||
| Signal-Prefix.pch | ||
| Signal.entitlements | ||
| SignalTSan.supp | ||
| SignalUBSan.supp | ||