mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 15:22:39 +00:00
Remove plist and unused SwiftGen config and generated file
This commit is contained in:
parent
e08e5d7fb1
commit
cab61d0f73
4 changed files with 1 additions and 121 deletions
|
@ -1,38 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>pinRoomsWithMissedNotif</key>
|
|
||||||
<true/>
|
|
||||||
<key>pinRoomsWithUnread</key>
|
|
||||||
<true/>
|
|
||||||
<key>matrixApps</key>
|
|
||||||
<true/>
|
|
||||||
<key>showAllEventsInRoomHistory</key>
|
|
||||||
<false/>
|
|
||||||
<key>showRedactionsInRoomHistory</key>
|
|
||||||
<true/>
|
|
||||||
<key>showUnsupportedEventsInRoomHistory</key>
|
|
||||||
<false/>
|
|
||||||
<key>sortRoomMembersUsingLastSeenTime</key>
|
|
||||||
<true/>
|
|
||||||
<key>showLeftMembersInRoomMemberList</key>
|
|
||||||
<false/>
|
|
||||||
<key>syncLocalContacts</key>
|
|
||||||
<false/>
|
|
||||||
<key>enableRageShake</key>
|
|
||||||
<true/>
|
|
||||||
<key>maxAllowedMediaCacheSize</key>
|
|
||||||
<integer>1073741824</integer>
|
|
||||||
<key>presenceColorForOnlineUser</key>
|
|
||||||
<integer>3401011</integer>
|
|
||||||
<key>presenceColorForUnavailableUser</key>
|
|
||||||
<integer>15066368</integer>
|
|
||||||
<key>presenceColorForOfflineUser</key>
|
|
||||||
<integer>15020851</integer>
|
|
||||||
<key>enableBotCreation</key>
|
|
||||||
<false/>
|
|
||||||
<key>enableRingingForGroupCalls</key>
|
|
||||||
<false/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
|
@ -1,73 +0,0 @@
|
||||||
// swiftlint:disable all
|
|
||||||
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
|
|
||||||
// swiftlint:disable superfluous_disable_command
|
|
||||||
// swiftlint:disable file_length
|
|
||||||
|
|
||||||
// MARK: - Plist Files
|
|
||||||
|
|
||||||
// swiftlint:disable identifier_name line_length type_body_length
|
|
||||||
internal enum RiotDefaults {
|
|
||||||
private static let _document = PlistDocument(path: "Riot-Defaults.plist")
|
|
||||||
|
|
||||||
internal static let enableBotCreation: Bool = _document["enableBotCreation"]
|
|
||||||
internal static let enableRageShake: Bool = _document["enableRageShake"]
|
|
||||||
internal static let enableRingingForGroupCalls: Bool = _document["enableRingingForGroupCalls"]
|
|
||||||
internal static let matrixApps: Bool = _document["matrixApps"]
|
|
||||||
internal static let maxAllowedMediaCacheSize: Int = _document["maxAllowedMediaCacheSize"]
|
|
||||||
internal static let pinRoomsWithMissedNotif: Bool = _document["pinRoomsWithMissedNotif"]
|
|
||||||
internal static let pinRoomsWithUnread: Bool = _document["pinRoomsWithUnread"]
|
|
||||||
internal static let presenceColorForOfflineUser: Int = _document["presenceColorForOfflineUser"]
|
|
||||||
internal static let presenceColorForOnlineUser: Int = _document["presenceColorForOnlineUser"]
|
|
||||||
internal static let presenceColorForUnavailableUser: Int = _document["presenceColorForUnavailableUser"]
|
|
||||||
internal static let showAllEventsInRoomHistory: Bool = _document["showAllEventsInRoomHistory"]
|
|
||||||
internal static let showLeftMembersInRoomMemberList: Bool = _document["showLeftMembersInRoomMemberList"]
|
|
||||||
internal static let showRedactionsInRoomHistory: Bool = _document["showRedactionsInRoomHistory"]
|
|
||||||
internal static let showUnsupportedEventsInRoomHistory: Bool = _document["showUnsupportedEventsInRoomHistory"]
|
|
||||||
internal static let sortRoomMembersUsingLastSeenTime: Bool = _document["sortRoomMembersUsingLastSeenTime"]
|
|
||||||
internal static let syncLocalContacts: Bool = _document["syncLocalContacts"]
|
|
||||||
}
|
|
||||||
// swiftlint:enable identifier_name line_length type_body_length
|
|
||||||
|
|
||||||
// MARK: - Implementation Details
|
|
||||||
|
|
||||||
private func arrayFromPlist<T>(at path: String) -> [T] {
|
|
||||||
guard let url = BundleToken.bundle.url(forResource: path, withExtension: nil),
|
|
||||||
let data = NSArray(contentsOf: url) as? [T] else {
|
|
||||||
fatalError("Unable to load PLIST at path: \(path)")
|
|
||||||
}
|
|
||||||
return data
|
|
||||||
}
|
|
||||||
|
|
||||||
private struct PlistDocument {
|
|
||||||
let data: [String: Any]
|
|
||||||
|
|
||||||
init(path: String) {
|
|
||||||
guard let url = BundleToken.bundle.url(forResource: path, withExtension: nil),
|
|
||||||
let data = NSDictionary(contentsOf: url) as? [String: Any] else {
|
|
||||||
fatalError("Unable to load PLIST at path: \(path)")
|
|
||||||
}
|
|
||||||
self.data = data
|
|
||||||
}
|
|
||||||
|
|
||||||
subscript<T>(key: String) -> T {
|
|
||||||
guard let result = data[key] as? T else {
|
|
||||||
fatalError("Property '\(key)' is not of type \(T.self)")
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// swiftlint:disable convenience_type
|
|
||||||
private final class BundleToken {
|
|
||||||
static let bundle: Bundle = {
|
|
||||||
#if SWIFT_PACKAGE
|
|
||||||
return Bundle.module
|
|
||||||
#else
|
|
||||||
return Bundle(for: BundleToken.self)
|
|
||||||
#endif
|
|
||||||
}()
|
|
||||||
}
|
|
||||||
// swiftlint:enable convenience_type
|
|
|
@ -139,8 +139,6 @@
|
||||||
<string>im.vector.app.pills</string>
|
<string>im.vector.app.pills</string>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>UserDefaults</key>
|
|
||||||
<string>${PRODUCT_NAME}-Defaults</string>
|
|
||||||
<key>applicationGroupIdentifier</key>
|
<key>applicationGroupIdentifier</key>
|
||||||
<string>$(APPLICATION_GROUP_IDENTIFIER)</string>
|
<string>$(APPLICATION_GROUP_IDENTIFIER)</string>
|
||||||
<key>baseBundleIdentifier</key>
|
<key>baseBundleIdentifier</key>
|
||||||
|
|
|
@ -29,11 +29,4 @@ xcassets:
|
||||||
- Assets/SharedImages.xcassets
|
- Assets/SharedImages.xcassets
|
||||||
outputs:
|
outputs:
|
||||||
templatePath: Templates/Assets/swift4-element.stencil
|
templatePath: Templates/Assets/swift4-element.stencil
|
||||||
output: Images.swift
|
output: Images.swift
|
||||||
plist:
|
|
||||||
inputs: Assets/Riot-Defaults.plist
|
|
||||||
outputs:
|
|
||||||
templateName: runtime-swift4
|
|
||||||
output: RiotDefaults.swift
|
|
||||||
params:
|
|
||||||
enumName: RiotDefaults
|
|
Loading…
Reference in a new issue