-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into tencent-translate-type-TC
- Loading branch information
Showing
11 changed files
with
83 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// GlobalContext.swift | ||
// Easydict | ||
// | ||
// Created by 戴藏龙 on 2024/1/25. | ||
// Copyright © 2024 izual. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import Sparkle | ||
|
||
@objcMembers | ||
class GlobalContext: NSObject { | ||
static let shared = GlobalContext() | ||
|
||
let updaterController: SPUStandardUpdaterController | ||
|
||
private let updaterHelper: SPUUpdaterHelper | ||
private let userDriverHelper: SPUUserDriverHelper | ||
|
||
override init() { | ||
updaterHelper = SPUUpdaterHelper() | ||
userDriverHelper = SPUUserDriverHelper() | ||
|
||
updaterController = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: updaterHelper, userDriverDelegate: userDriverHelper) | ||
} | ||
|
||
class SPUUpdaterHelper: NSObject, SPUUpdaterDelegate { | ||
func feedURLString(for _: SPUUpdater) -> String? { | ||
var feedURLString = "https://raw.githubusercontent.com/tisfeng/Easydict/main/appcast.xml" | ||
#if DEBUG | ||
feedURLString = "http://localhost:8000/appcast.xml" | ||
#endif | ||
return feedURLString | ||
} | ||
} | ||
|
||
class SPUUserDriverHelper: NSObject, SPUStandardUserDriverDelegate { | ||
var supportsGentleScheduledUpdateReminders: Bool { | ||
true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters