From f697ce7adf0348039a94c24a0029489e00679ec1 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Tue, 21 May 2024 04:59:23 +0900 Subject: [PATCH] =?utf8?q?TabInformations.IsMuted=E3=82=92IsGlobalMuted?= =?utf8?q?=E3=81=AB=E5=90=8D=E5=89=8D=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- OpenTween.Tests/Models/TabInformationTest.cs | 8 ++++---- OpenTween/Models/InternalStorageTabModel.cs | 2 +- OpenTween/Models/TabInformations.cs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenTween.Tests/Models/TabInformationTest.cs b/OpenTween.Tests/Models/TabInformationTest.cs index 5cafa64a..01f5c202 100644 --- a/OpenTween.Tests/Models/TabInformationTest.cs +++ b/OpenTween.Tests/Models/TabInformationTest.cs @@ -540,7 +540,7 @@ namespace OpenTween.Models } [Fact] - public void IsMuted_MuteTabRules_Test() + public void IsGlobalMuted_MuteTabRules_Test() { var muteTab = new MuteTabModel(); muteTab.AddFilter(new PostFilterRule @@ -556,11 +556,11 @@ namespace OpenTween.Models ScreenName = "foo", Text = "hogehoge", }; - Assert.True(this.tabinfo.IsMuted(post)); + Assert.True(this.tabinfo.IsGlobalMuted(post)); } [Fact] - public void IsMuted_MuteTabRules_NotFilteredTest() + public void IsGlobalMuted_MuteTabRules_NotFilteredTest() { var muteTab = new MuteTabModel(); muteTab.AddFilter(new PostFilterRule @@ -577,7 +577,7 @@ namespace OpenTween.Models ScreenName = "bar", Text = "hogehoge", }; - Assert.False(this.tabinfo.IsMuted(post)); + Assert.False(this.tabinfo.IsGlobalMuted(post)); } [Fact] diff --git a/OpenTween/Models/InternalStorageTabModel.cs b/OpenTween/Models/InternalStorageTabModel.cs index 02038f39..78ab9d73 100644 --- a/OpenTween/Models/InternalStorageTabModel.cs +++ b/OpenTween/Models/InternalStorageTabModel.cs @@ -50,7 +50,7 @@ namespace OpenTween.Models public override void AddPostQueue(PostClass post) { - if (TabInformations.GetInstance().IsMuted(post)) + if (TabInformations.GetInstance().IsGlobalMuted(post)) return; this.internalPosts.TryAdd(post.StatusId, post); diff --git a/OpenTween/Models/TabInformations.cs b/OpenTween/Models/TabInformations.cs index e58c5e64..af92203c 100644 --- a/OpenTween/Models/TabInformations.cs +++ b/OpenTween/Models/TabInformations.cs @@ -572,7 +572,7 @@ namespace OpenTween.Models lock (this.lockObj) { - if (this.IsMuted(item)) + if (this.IsGlobalMuted(item)) return; if (this.Posts.TryGetValue(item.StatusId, out var status)) @@ -616,7 +616,7 @@ namespace OpenTween.Models } } - public bool IsMuted(PostClass post) + public bool IsGlobalMuted(PostClass post) { var muteTab = this.MuteTab; if (muteTab != null && muteTab.AddFiltered(post) == MyCommon.HITRESULT.Move) @@ -639,7 +639,7 @@ namespace OpenTween.Models { lock (this.lockObj) { - if (this.IsMuted(item)) + if (this.IsGlobalMuted(item)) return false; this.quotes[item.StatusId] = item; -- 2.11.0