Esempio n. 1
0
        public async Task <bool> RemoveAllHistoriesAsync()
        {
            if (_watchHitoryRemoveToken == null)
            {
                return(false);
            }

            var res = await _loginUserHistoryProvider.RemoveAllHistoriesAsync(_watchHitoryRemoveToken);

            if (res.IsOK)
            {
                WatchHistoryAllRemoved?.Invoke(this, EventArgs.Empty);
            }

            return(res.IsOK);
        }
Esempio n. 2
0
        public async Task <bool> RemoveAllHistoriesAsync()
        {
            try
            {
                var res = await _LoginUserVideoWatchHistoryProvider.RemoveAllHistoriesAsync();

                if (res)
                {
                    WatchHistoryAllRemoved?.Invoke(this, EventArgs.Empty);

                    _notificationService.ShowLiteInAppNotification_Success("VideoHistories_AllDelete_Success".Translate());
                }
                else
                {
                    _notificationService.ShowLiteInAppNotification_Success("VideoHistories_AllDeleted_Fail".Translate());
                }
                return(res);
            }
            catch
            {
                _notificationService.ShowLiteInAppNotification_Success("VideoHistories_AllDeleted_Fail".Translate());
                throw;
            }
        }