Description: https://github.com/organicmaps/organicmaps/issues/10222
Also this commit fixes the issue when the Live Activity is Disabled in the settings then the start recording fails
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
When the user deletes the file locally with the enabled icloud happens this:
1. the file is moved to the local .Trash dir
2. the LocalDirectoryMonitor send event to delete the file from the iCloud
3. the SynchronizationFileWriter trash the remote file using the system API `try fileManager.trashItem`
4. the file is moved to the devices trash
5. the icloud sends the update to the metadataQery's `queryDidUpdate` with the updated state. This update is tricky - it calls the method twice: on the first call the deleted file appears in the updated list (`userInfo[NSMetadataQueryUpdateChangedItemsKey]`) and on the second call the deleted file appears in the deleted list (`userInfo[NSMetadataQueryUpdateRemovedItemsKey]`). There is no way to disable this behaviour.
At that point the bug can happens: the 1st `update` (that contains the file in the deleted list) call can triggers the file recreation because the synchroisztion starts to process the event and make an attempt to recreate the file but it is already deleted.
The fix is: skip missed file during the `Update` event. The case when the missed file is in the updated in undefined and should be skipped by checking the file existence.
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
1. for now the structure is SheetStyle.Global/PlacePage/Font/TestColor...
2. the styles are used by assessing the property
before:
lineView.setStyleAndApply("Divider")
headerTitleLabel.setStyleAndApply("semibold18:blackPrimaryText")
after:
lineView.setStyleAndApply(.global(.divider))
headerTitleLabel.setFontStyle(.semibold18, color: .blackPrimary)
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This refactoring allows to split the data for the PP on 2 parts:
1. TrackRecordingInfo (dist, dur, acend, descend etc)
2. ElecationProfileData (only the points to draw)
Because the PP should be created only with the 1st one for the TrackRecordings (will be implemented later) and the PP shoul display all the info without the chart.
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
* [platform] add ProductsConfig
1. fetch and parse ProductsConfig json
2. save it to the separate file "products_settings.json"
3. small servers_list.cpp refactoring
4. add unit tests for servers config and products config
5. add products fetching to the framework
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
1. remove the iCLoud's .Trash dir scanning because on ios this feature is blocked. This is why the `isRemoved` property was removed from the `MitadataItem`
2. runtime monitors sends only the added/updated/deleted items lists on didUpdate and the whole content on didFinishGathering
3. because of 1, when icloud is running - it is source of truth.
During the initial phase (1st enabling of enabling after disabling) all the data from the cloud and local dir will be preserved.
4. simplified the state manager's logic
5. improved logs
6. fixed test
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
- The `CoreApi-Swift.h` is a file that should be generated by the xcode to opens the swift classes
to the objc
- Custom hardcoded `CoreApi-swift.h` blocks this feature and contains objc headers. It blocks the autogeneration and don't allow to use the swift and objc classes in the same framework. This is why the file is removed and all the file's content is moved to the 'CoreApi.h'.
- The `Framework.h` can be used only but the objc so it is removed from the 'CoreApi.h' and is imported only when it's necessary
- `Defines Module` is set to NO because it should be set to YES only after the first swift file is added to the framework. In other case the bridging file will not be generated
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
When the file doesn't exist in the icloud dir and the manager attemps to move this file into the trash the exception is thrown and the sync is stopped. This issue was fixed by the additional file existence check.
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
* [Android] Implemented OAuth2 flow with browser
Signed-off-by: S. Kozyr <s.trump@gmail.com>
* [Android] Small improvements
Signed-off-by: S. Kozyr <s.trump@gmail.com>
* Small changes according to PR comments.
Signed-off-by: S. Kozyr <s.trump@gmail.com>
---------
Signed-off-by: S. Kozyr <s.trump@gmail.com>
The audio session is once configured during initialisation and then each time a
audio session is set active. This commit configures the audio session only once
when the app is started. In addition, it sets AVAudioSessionModeVoicePrompt,
which is recommended for apps that use text-to-speech.
Signed-off-by: Fabian Wüthrich <me@fabwu.ch>
The LocationManager updates the framework location quite complicated. On every
location update the LocationManager sets the frameworkUpdateMode property. The
setter of this property calls updateFrameworkInfo and passes the update to the
framework. A quick test revealed that calling the framework directly without
going over the property also works. Removing the frameworkUpdateMode property
and the updateFrmeworkInfo makes the code clearer and easier to read.
Signed-off-by: Fabian Wüthrich <me@fabwu.ch>
The app is configured to update the GPS location in the background but this
information is not passed to the framework. With this commit the GPS location
is passed to the framework even when the app is in background. This results in
a higher battery usage if there is an active route but the battery usage will
remain the same if no route is active because the GPS location is not updated.
Close#6940
Signed-off-by: Fabian Wüthrich <me@fabwu.ch>
- increase grabber size
- move the share button to the PP's and Layers header trailing-top corner
- add a new color for the close/share icons on the pp
- crate a new button class with rounded image
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
- throws an exeption when the metadata cannot be initialized from the url or nsmetadataitem
- add 2 new sync errors cases to clarify errors reasons
- stop sync on the all errors except ubiquity errors (uploading/downloading)
- subscribe the settings screen on the sync state notification to update the relates cell properly from the cloud manager
- show the alert with an error if cloud sync fails with proposal to the user to send a bugreport
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>