mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-04 05:26:48 +00:00
Update submodules
This commit is contained in:
parent
f16dd8dc6a
commit
4df56689cb
@ -250,31 +250,11 @@ func importLegacyPreferences(accountManager: AccountManager, account: TemporaryA
|
|||||||
})
|
})
|
||||||
|
|
||||||
transaction.updateSharedData(ApplicationSpecificSharedDataKeys.automaticMediaDownloadSettings, { current in
|
transaction.updateSharedData(ApplicationSpecificSharedDataKeys.automaticMediaDownloadSettings, { current in
|
||||||
var settings: AutomaticMediaDownloadSettings = current as? AutomaticMediaDownloadSettings ?? .defaultSettings
|
var settings: MediaAutoDownloadSettings = current as? MediaAutoDownloadSettings ?? .defaultSettings
|
||||||
|
|
||||||
if let preferences = autoDownloadPreferences, !preferences.isDefaultPreferences() {
|
if let preferences = autoDownloadPreferences, !preferences.isDefaultPreferences() {
|
||||||
//settings.cellular.enabled = !preferences.disabled
|
settings.cellular.enabled = !preferences.disabled
|
||||||
//settings.wifi.enabled = !preferences.disabled
|
settings.wifi.enabled = !preferences.disabled
|
||||||
|
|
||||||
// let peerPaths: [(WritableKeyPath<AutomaticMediaDownloadPeers, AutomaticMediaDownloadCategories>, TGAutoDownloadMode, TGAutoDownloadMode)] = [
|
|
||||||
// (\AutomaticMediaDownloadPeers.contacts, TGAutoDownloadModeCellularContacts, TGAutoDownloadModeWifiContacts),
|
|
||||||
// (\AutomaticMediaDownloadPeers.channels, TGAutoDownloadModeCellularChannels, TGAutoDownloadModeWifiChannels),
|
|
||||||
// (\AutomaticMediaDownloadPeers.groups, TGAutoDownloadModeCellularGroups, TGAutoDownloadModeWifiGroups),
|
|
||||||
// (\AutomaticMediaDownloadPeers.otherPrivate, TGAutoDownloadModeCellularPrivateChats, TGAutoDownloadModeWifiPrivateChats)
|
|
||||||
// ]
|
|
||||||
//
|
|
||||||
// let categoryPaths: [(WritableKeyPath<AutomaticMediaDownloadCategories, AutomaticMediaDownloadCategory>, TGAutoDownloadMode, Int32)] = [
|
|
||||||
// (\AutomaticMediaDownloadCategories.photo, preferences.photos, Int32.max),
|
|
||||||
// (\AutomaticMediaDownloadCategories.file, preferences.documents, preferences.maximumDocumentSize),
|
|
||||||
// (\AutomaticMediaDownloadCategories.video, preferences.videos, preferences.maximumVideoSize)
|
|
||||||
// ]
|
|
||||||
//
|
|
||||||
// for (categoryPath, category, maxSize) in categoryPaths {
|
|
||||||
// for (peerPath, cellular, wifi) in peerPaths {
|
|
||||||
// let targetPath = peerPath.appending(path: categoryPath)
|
|
||||||
// settings.peers[keyPath: targetPath] = AutomaticMediaDownloadCategory(cellular: (category.rawValue & cellular.rawValue) != 0, cellularSizeLimit: maxSize, cellularPredownload: true, wifi: (category.rawValue & wifi.rawValue) != 0, wifiSizeLimit: maxSize, wifiPredownload: true)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let parsedAutoplayGifs = parsedAutoplayGifs {
|
if let parsedAutoplayGifs = parsedAutoplayGifs {
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 09f1b2631594c56a886368290f9a77d73a017cf5
|
Subproject commit dab6a3cc9f2839efb4c2cb67f1fd493b53cd97f6
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit 32cd282659247d6aee11253107f5d1857f4ff17a
|
Subproject commit 36c11351015f2d608608501e116e42abe481451f
|
||||||
Loading…
x
Reference in New Issue
Block a user