Пример #1
0
        private bool CanSync()
        {
            if (!UserSettings.Synchronization.Enabled)
            {
                return(false);
            }
            if (!CrossConnectivity.Current.IsConnected)
            {
                return(false);
            }
            if (UserSettings.Synchronization.OnlyWifi &&
                !(CrossConnectivity.Current.ConnectionTypes.Contains(Plugin.Connectivity.Abstractions.ConnectionType.WiFi) ||
                  CrossConnectivity.Current.ConnectionTypes.Contains(Plugin.Connectivity.Abstractions.ConnectionType.Desktop))
                )
            {
                return(false);
            }
            if (!_cloudStorageService.IsConnected())
            {
                return(false);
            }

            return(true);
        }