Closed hamedpro closed 1 year ago
profile seeds don't have a range inside them. they only have a max depth ( #197 ). also calendar and event and task are gone so only thing which is remained is this : in syncing profile seeds, server sends back a union of discoverable transactions for those profiles. it also sends discoverable transaction ids for each profile and it can be compressed using this ranges helper. there is no need to send a large array of ints and waste network.
in few parts we are dealing with
int ranges
. for example we have a bit complex code to detect and avoid conflicts in time ranges of tasks and events in the calendar. (search for is_there_any_conflict && timestamp_filled_range funcs). alsoprofiles
work with int ranges. extract the logic to a class or something which can be used to mask an array or ... . in this way code is more readable and easier to test. ranges in our case must beformatted strings
like "22-33,44-55" (supporting multi part ). in this case just refactor those 2 mentioned parts with this new system and close the issue.