Beispiel #1
0
        public async Task CreateRay(string text)
        {
            var ray = new Ray()
            {
                FrequencyId = selectedFrequency.Value,
                Text        = text,
                UserId      = CurrentUser.Id
            };

            if (CurrentUser.Id == 0)
            {
                await GetOrCreateUser();

                ray.UserId = CurrentUser.Id;
            }

            Rays = await http.PostJsonAsync <List <Ray> >("/api/Ray/Add", ray);

            UpdatedRays?.Invoke();
        }
Beispiel #2
0
        public async Task CreateRay(string text)
        {
            var ray = new Ray()
            {
                FrequencyId = selectedFrequency.Value,
                Text        = text,
                UserId      = CurrentUser.Id
            };

            if (CurrentUser.Id == 0)
            {
                await GetOrCreateUser();

                ray.UserId = CurrentUser.Id;
            }

            Rays = await _apiService.AddRay(ray);

            UpdatedRays?.Invoke();
        }