Skip to content

Commit

Permalink
[#] 修复补丁无法在线获取的问题 & 新增提示
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyadanli committed Aug 6, 2022
1 parent 66245b7 commit 603d8f5
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 24 deletions.
1 change: 1 addition & 0 deletions RevokeMsgPatcher.Assistant/Data/1.6/patch.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions RevokeMsgPatcher.Assistant/JsonData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public Bag Bag()
return new Bag
{
Apps = AppConfig(),
LatestVersion = "1.5",
PatchVersion = 20220716,
LatestVersion = "1.6",
PatchVersion = 20220806,
Notice = ""
};
}
Expand Down Expand Up @@ -121,18 +121,18 @@ public App Wechat()
EndVersion="",
ReplacePatterns = new List<ReplacePattern>
{
//new ReplacePattern
//{
// Search = ByteUtil.HexStringToByteArray("00 85 C0 74 32 B9 3F 3F 3F 3F 8A"),
// Replace = ByteUtil.HexStringToByteArray("00 85 C0 EB 32 B9 3F 3F 3F 3F 8A"),
// Category = "防撤回"
//},
new ReplacePattern
{
Search = ByteUtil.HexStringToByteArray("00 85 C0 74 32 B9 3F 3F 3F 3F 8A"),
Replace = ByteUtil.HexStringToByteArray("00 85 C0 EB 32 B9 3F 3F 3F 3F 8A"),
Category = "防撤回(老)"
},
// 带撤回提示
new ReplacePattern
{
Search = ByteUtil.HexStringToByteArray("80 7D F2 00 6A 01 74"),
Replace = ByteUtil.HexStringToByteArray("80 7D F2 00 6A 01 EB"),
Category = "防撤回"
Category = "防撤回带提示(新)"
},
new ReplacePattern
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<None Include="Data\1.3\patch.json" />
<None Include="Data\1.4\patch.json" />
<None Include="Data\1.5\patch.json" />
<None Include="Data\1.6\patch.json" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
30 changes: 17 additions & 13 deletions RevokeMsgPatcher/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions RevokeMsgPatcher/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,25 @@ private void btnPatch_Click(object sender, EventArgs e)
btnRestore.Enabled = modifier.BackupExists();
return;
}
// 20220806 偷懒的特殊逻辑,用于提示用户选择对防撤回功能进行二选一
if (categories.Contains("防撤回(老)") && categories.Contains("防撤回带提示(新)"))
{
DialogResult result = MessageBox.Show(@"防撤回(老) 和 防撤回带提示(新) 两个功能二选一即可!
1. 防撤回(老) 没有提示;
2. 防撤回带提示(新) 有撤回提示 但是存在以下问题:
a. 如果正在和对方聊天时,对方撤回了消息,那撤回提示依然不会显示,只有在左侧预览窗有显示撤回,需要切换到和别人的聊天窗再切回来才能看到撤回提示,如果是把聊天拉出单独窗口,一直不会有撤回提示。
b. 视频/图片消息撤回后会被删除,无法查看
c. 部分历史消息无法防撤回;
点击确定继续,点击取消重新选择!", "功能选择提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result != DialogResult.Yes)
{
return;
}
}

// c.计算SHA1,验证文件完整性,寻找对应的补丁信息(精确版本、通用特征码两种补丁信息)
try
{
Expand Down
3 changes: 3 additions & 0 deletions RevokeMsgPatcher/FormMain.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>182, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down
15 changes: 15 additions & 0 deletions RevokeMsgPatcher/Model/ReplacePattern.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ public class ReplacePattern

public string Category { get; set; }

/// <summary>
/// 悬浮气泡提示
/// </summary>
public string Tips { get; set; }

/// <summary>
/// 同类冲突标签
/// </summary>
public string SimilarCategories { get; set; }

/// <summary>
/// 选择同类冲突标签时的提示
/// </summary>
public string ChooseSimilarCategoriesMsg { get; set; }

public ReplacePattern Clone()
{
ReplacePattern o = new ReplacePattern();
Expand Down
2 changes: 1 addition & 1 deletion RevokeMsgPatcher/Properties/Resources.resx

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion RevokeMsgPatcher/Utils/HttpUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ static HttpUtil()
/// https://huiyadanli.github.io/i/revokemsg/05.json
/// 会自动跳转,没用了
/// https://gitee.com/huiyadanli/RevokeMsgPatcher/raw/master/RevokeMsgPatcher.Assistant/Data/1.2/patch.json
/// 需要登录,没用了
/// https://huiyadanli.coding.net/p/RevokeMsgPatcher/d/RevokeMsgPatcher/git/raw/master/RevokeMsgPatcher.Assistant/Data/1.5/patch.json
/// </summary>
private static readonly string[] urls = new string[]
{
"https://huiyadanli.coding.net/p/RevokeMsgPatcher/d/RevokeMsgPatcher/git/raw/master/RevokeMsgPatcher.Assistant/Data/1.5/patch.json",
"https://hui-config.oss-cn-hangzhou.aliyuncs.com/1.6/patch.json",
"https://raw.githubusercontent.com/huiyadanli/RevokeMsgPatcher/master/RevokeMsgPatcher.Assistant/Data/1.5/patch.json"
};

Expand Down

0 comments on commit 603d8f5

Please sign in to comment.