添加multishare配置,用来开启关闭3分享

This commit is contained in:
joywayer
2026-07-03 22:20:48 +08:00
parent 113b4d4960
commit d76064c4c5
4 changed files with 45 additions and 16 deletions
+12 -3
View File
@@ -6,7 +6,10 @@
// ViewController 各注册一份且**行为不同**,新外壳按页面 mode 分发:
//
// • dispatchSubGame — 对齐 msext gameController.m:575-597(活路径):
// - sharefriend == "1" → SharePanel 三选一(微信/QQ/抖音)
// - sharefriend == "1" 且 BundleConfig.isMultiShareEnabled
// → SharePanel 三选一(微信/QQ/抖音)
// - sharefriend == "1" 且 multishare 关闭
// → 直发微信好友(渠道级降级为单一平台)
// - 其他 → WechatShare.share() 朋友圈 timeline
//
// • dispatchLobby — 对齐 msext NewRootVC.m:453-537:直发微信,无 SharePanel
@@ -27,8 +30,14 @@ public enum ShareCenter {
public static func dispatchSubGame(_ content: ShareContent) {
switch content.sharefriend {
case "1":
// 好友/私聊 → SharePanel 三选一
SharePanel.show(content: content)
// 好友/私聊:渠道级开关决定弹面板还是直发微信
if BundleConfig.shared.isMultiShareEnabled {
SharePanel.show(content: content)
} else {
// multishare = "0" → 三分享关闭,直接走微信好友(scene 参数在
// 剪贴板路径下用于文案 / 语义标注,不实际影响粘贴目标)
WechatShare.shared.share(content, scene: .friend)
}
default:
// sharefriend == "2" 或缺失或其他 → msext WechatShareManager