status-go icon indicating copy to clipboard operation
status-go copied to clipboard

Added Store Handlers for Synced Settings

Open Samyoul opened this issue 3 years ago • 2 comments
trafficstars

What's Changed?

This PR adds new StickerPacksStoreHandlers for settings that are synced. In this PR I've introduced 2 types:

  • OverwriteStoreHandler, general setting update
  • StickerPacksStoreHandler, specific sticker pack merge handling. Currently does not handle deletion of sticker packs.

Added comprehensive testing for merge scenarios:

Merge from only device 1

  1. device 1 and device 2 pair
  2. device 1 adds sticker pack 1
  3. device 2 receives synced sticker pack 1
  4. device 1 adds sticker pack 2
  5. device 2 receives synced sticker pack 2
  6. device 2 gets all stored sticker packs
  7. device 2 has 2 sticker packs

Merge into device 2 with pre-pair sticker pack

  1. device 2 adds sticker pack 3
  2. device 1 and device 2 pair
  3. device 1 adds sticker pack 4
  4. device 2 receives sticker pack 4
  5. device 2 has 2 sticker packs
    • original sticker pack 3 from device 2 and sticker pack 4 from device 1

Merge both directions with pre and post pair sticker packs

  1. device 1 adds sticker pack 1
  2. device 2 adds sticker pack 2
  3. device 1 and device 2 pair
  4. device 1 shows 2 sticker packs, sticker pack 1 and 2
  5. device 2 shows 2 sticker packs, sticker pack 2 and 1
  6. device 1 adds sticker pack 3
  7. device 2 adds sticker pack 4
  8. device 1 shows 4 sticker packs, sticker pack 1, 2, 3 and 4
  9. device 2 shows 4 sticker packs, sticker pack 2, 1, 4 and 3

To Do

  • [x] Add merge handling of sticker packs
  • [x] Merge https://github.com/status-im/status-go/pull/2719 to prevent regression in next version
  • [ ] Add deletion handling of sticker packs
  • [ ] Sync with desktop and mobile UI on implementing handling deletedAt fields on the StickerPack struct

Samyoul avatar Jun 15 '22 12:06 Samyoul

Pull Request Checklist

  • [ ] Have you updated the documentation, if impacted (e.g. docs.status.im)?
  • [ ] Have you tested changes with mobile?
  • [ ] Have you tested changes with desktop?

status-github-bot[bot] avatar Jun 15 '22 12:06 status-github-bot[bot]

Jenkins Builds

Click to see older builds (30)
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: cf5e54f6 #1 2022-06-15 12:38:46 ~2 min linux :package:zip
:heavy_check_mark: cf5e54f6 #1 2022-06-15 12:41:23 ~4 min ios :package:zip
:heavy_check_mark: cf5e54f6 #1 2022-06-15 12:41:32 ~4 min android :package:aar
:heavy_check_mark: e46bcc50 #2 2022-06-15 12:51:57 ~1 min linux :package:zip
:heavy_check_mark: e46bcc50 #2 2022-06-15 12:52:08 ~1 min ios :package:zip
:heavy_check_mark: e46bcc50 #2 2022-06-15 12:55:09 ~4 min android :package:aar
:heavy_check_mark: ccf9d0d2 #3 2022-06-15 12:57:44 ~1 min linux :package:zip
:heavy_check_mark: ccf9d0d2 #3 2022-06-15 12:58:03 ~1 min ios :package:zip
:heavy_check_mark: ccf9d0d2 #3 2022-06-15 12:59:03 ~3 min android :package:aar
:heavy_check_mark: 682e48af #4 2022-06-16 13:16:01 ~1 min ios :package:zip
:heavy_check_mark: 682e48af #4 2022-06-16 13:17:04 ~3 min android :package:aar
:heavy_check_mark: 682e48af #4 2022-06-16 13:18:06 ~4 min linux :package:zip
:heavy_check_mark: ca6ac627 #5 2022-06-20 10:35:08 ~1 min linux :package:zip
:heavy_check_mark: ca6ac627 #5 2022-06-20 10:35:44 ~2 min ios :package:zip
:heavy_check_mark: ca6ac627 #5 2022-06-20 10:36:44 ~3 min android :package:aar
:heavy_check_mark: 8acf8b62 #6 2022-06-20 11:42:55 ~1 min linux :package:zip
:heavy_check_mark: 8acf8b62 #6 2022-06-20 11:44:58 ~3 min android :package:aar
:heavy_check_mark: 8acf8b62 #6 2022-06-20 11:47:43 ~6 min ios :package:zip
:heavy_check_mark: 3ebbc7c9 #7 2022-06-20 11:51:49 ~3 min android :package:aar
:heavy_check_mark: 3ebbc7c9 #7 2022-06-20 11:51:59 ~3 min linux :package:zip
:heavy_check_mark: 3ebbc7c9 #7 2022-06-20 11:53:06 ~4 min ios :package:zip
:heavy_check_mark: 8ae9c49a #8 2022-06-20 13:09:34 ~1 min linux :package:zip
:heavy_check_mark: 8ae9c49a #8 2022-06-20 13:10:04 ~2 min ios :package:zip
:heavy_check_mark: 8ae9c49a #8 2022-06-20 13:11:47 ~4 min android :package:aar
:heavy_check_mark: e6e7d2ca #9 2022-06-20 13:16:54 ~2 min ios :package:zip
:heavy_check_mark: e6e7d2ca #9 2022-06-20 13:17:31 ~2 min android :package:aar
:heavy_check_mark: e6e7d2ca #9 2022-06-20 13:17:54 ~3 min linux :package:zip
:heavy_check_mark: 961199e6 #10 2022-06-20 13:39:44 ~1 min linux :package:zip
:heavy_check_mark: 961199e6 #10 2022-06-20 13:40:47 ~2 min ios :package:zip
:heavy_check_mark: 961199e6 #10 2022-06-20 13:42:46 ~4 min android :package:aar
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: 54879fa1 #11 2022-06-20 13:58:23 ~1 min linux :package:zip
:heavy_check_mark: 54879fa1 #11 2022-06-20 13:58:39 ~1 min ios :package:zip
:heavy_check_mark: 54879fa1 #11 2022-06-20 13:59:51 ~3 min android :package:aar
:heavy_check_mark: 87ddd53c #12 2022-09-01 09:56:46 ~5 min ios :package:zip
:heavy_check_mark: 87ddd53c #12 2022-09-01 09:57:02 ~6 min linux :package:zip
:heavy_check_mark: 87ddd53c #12 2022-09-01 09:57:24 ~6 min android :package:aar

status-im-auto avatar Jun 15 '22 12:06 status-im-auto