Skip to content

Commit

Permalink
使用某些截图工具截图复制后,无法触发上传
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeric-X committed Jun 11, 2024
1 parent e64ee30 commit 3b72a34
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/SyncClipboard.Core/Models/ClipboardMetaInfomation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public virtual bool Equals(ClipboardMetaInfomation? other)
&& EqualityContract == other.EqualityContract
&& EqualityComparer<string>.Default.Equals(Text, other.Text)
&& EqualityComparer<string>.Default.Equals(Html, other.Html)
//&& EqualityComparer<IClipboardImage>.Default.Equals(Image, other.Image)
&& EqualityComparer<IClipboardImage>.Default.Equals(Image, other.Image)
&& SameFIles(other.Files)
&& EqualityComparer<DragDropEffects?>.Default.Equals(Effects, other.Effects)
&& EqualityComparer<string>.Default.Equals(OriginalType, other.OriginalType));
Expand All @@ -55,6 +55,7 @@ public override int GetHashCode()
Files?.ListHashCode() ?? 0,
Effects?.GetHashCode() ?? 0,
OriginalType?.GetHashCode() ?? 0,
Image?.GetHashCode() ?? 0,
};

return hashList.ListHashCode();
Expand Down
15 changes: 15 additions & 0 deletions src/SyncClipboard.Core/Utilities/ClipboardImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,19 @@ private static void WriteToFile(string file)
Cache.Seek(0, SeekOrigin.Begin);
Cache.CopyTo(fileStream);
}

public override bool Equals(object? obj)
{
if (obj == null || GetType() != obj.GetType())
{
return false;
}

return _imageBytes.SequenceEqual(((ClipboardImage)obj)._imageBytes);
}

public override int GetHashCode()
{
return _imageBytes.ListHashCode();
}
}
2 changes: 1 addition & 1 deletion src/SyncClipboard.Desktop/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ internal class AppConfig : IAppConfig
{
public string AppId => Env.AppId;
public string AppStringId => "SyncClipboard.Desktop";
public string AppVersion => "0.7.3.1";
public string AppVersion => "0.7.3.2";
public string UpdateApiUrl => "https://api.github.com/repos/Jeric-X/SyncClipboard.Desktop/releases";
public string UpdateUrl => "https://github.com/Jeric-X/SyncClipboard.Desktop/releases/latest";
}
3 changes: 2 additions & 1 deletion src/SyncClipboard.Desktop/Changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
0.7.3.1
0.7.3.2
- 修复:不设置hash上传图片/文件到服务器后,桌面客户端会无限重复设置剪贴板
- 修复:使用某些截图工具截图复制后,无法触发上传(https://github.com/Jeric-X/SyncClipboard/issues/88)

0.7.3
- 修复:macOS Menu Bar图标在同步关闭状态下被裁切、颜色错误
Expand Down

0 comments on commit 3b72a34

Please sign in to comment.