示例#1
0
        public static async Task InitData(bool silent = false)
        {
            var apiKey = Settings.ApiKey;
            var baseId = Settings.BaseId;

            if (string.IsNullOrEmpty(apiKey) || string.IsNullOrEmpty(baseId))
            {
                if (!silent)
                {
                    await Alerts.DisplayAlert("", "Go to Settings and enter Database API key and Base Id");
                }
                return;
            }

            try {
                await AppStorage.Initialize();

                await AppStorage.Instance.LoadData();
            }
            catch (Exception exc) {
                Debug.ExceptionCaught(exc);
                await Alerts.ExceptionAlert(exc);
            }
        }