Exemple #1
0
        public override void DisplayNewToast(IChatState chatState, IManageToasts toastsManager)
        {
            var settings = chatState.GetChannelSettingsById(TargetChannelId);
            if (settings == null) return;

            var setting = new ChannelSettingPair(settings.JoinLeaveNotifyLevel,
                settings.JoinLeaveNotifyOnlyForInteresting);
            DoToast(setting, toastsManager, chatState);
        }
        internal void DoToast(ChannelSettingPair setting, IManageToasts toastManager, IChatState chatState)
        {
            if (setting.OnlyForInteresting && !chatState.IsInteresting(Model.TargetCharacter.Name))
            {
                return;
            }

            toastManager.NotifyWithSettings(Model, setting.NotifyLevel);

            if (setting.NotifyLevel >= ChannelSettingsModel.NotifyLevel.NotificationAndToast)
            {
                SetToastData(toastManager.Toast);
            }
        }
        public override void DisplayNewToast(IChatState chatState, IManageToasts toastsManager)
        {
            var settings = chatState.GetChannelSettingsById(TargetChannelId);

            if (settings == null)
            {
                return;
            }

            var setting = new ChannelSettingPair(settings.PromoteDemoteNotifyLevel,
                                                 settings.PromoteDemoteNotifyOnlyForInteresting);

            DoToast(setting, toastsManager, chatState);
        }
        internal void DoToast(ChannelSettingPair setting, IManageToasts toastManager, IChatState chatState)
        {
            if (setting.OnlyForInteresting && !chatState.IsInteresting(Model.TargetCharacter.Name)) return;

            toastManager.NotifyWithSettings(Model, setting.NotifyLevel);

            if (setting.NotifyLevel >= ChannelSettingsModel.NotifyLevel.NotificationAndToast)
                SetToastData(toastManager.Toast);
        }