Skip to content

Commit dd1427d

Browse files
authored
Merge pull request #251 from flipperdevices/feature/infrared-library-ui
Small fixes for production ready feature "lnfrared Library"
2 parents 5a50add + f2de177 commit dd1427d

38 files changed

Lines changed: 559 additions & 280 deletions

Flipper/Packages/Analytics/Sources/Analytics/EventHandler.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public enum OpenTarget: Sendable {
6868
case fapHubApp(String)
6969
case fapHubInstall(String)
7070
case fapHubHide(String)
71+
case infraredLibraryOpen
72+
case infraredLibrarySave
7173

7274
public var value: String {
7375
switch self {

Flipper/Packages/Analytics/Sources/Clickhouse/ClickhouseAnalytics.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ fileprivate extension Metric_Events_Open.OpenTarget {
180180
case .fapHubApp: self = .openFaphubApp
181181
case .fapHubInstall: self = .installFaphubApp
182182
case .fapHubHide: self = .hideFaphubApp
183+
case .infraredLibraryOpen: self = .openInfraredLibrary
184+
case .infraredLibrarySave: self = .saveInfraredLibrary
183185
}
184186
}
185187
}

Flipper/Packages/Analytics/Sources/Countly/CountlyAnalytics.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ fileprivate extension OpenTarget {
173173
case .fapHubApp: return 16
174174
case .fapHubInstall: return 17
175175
case .fapHubHide: return 18
176+
case .infraredLibraryOpen: return 19
177+
case .infraredLibrarySave: return 20
176178
}
177179
}
178180
}

Flipper/Packages/Analytics/Sources/Protobuf/events/debug.pb.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// DO NOT EDIT.
22
// swift-format-ignore-file
3+
// swiftlint:disable all
34
//
45
// Generated by the Swift generator plugin for the protocol buffer compiler.
5-
// Source: debug.proto
6+
// Source: events/debug.proto
67
//
78
// For information on using the generated types, please see the documentation:
89
// https://github.com/apple/swift-protobuf/
910

10-
import Foundation
1111
import SwiftProtobuf
1212

1313
// If the compiler emits an error on this type, it is because this file
@@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
2020
typealias Version = _2
2121
}
2222

23-
struct Metric_Events_DebugInfo {
23+
struct Metric_Events_DebugInfo: Sendable {
2424
// SwiftProtobuf.Message conformance is added in an extension below. See the
2525
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
2626
// methods supported on all messages.
@@ -34,10 +34,6 @@ struct Metric_Events_DebugInfo {
3434
init() {}
3535
}
3636

37-
#if swift(>=5.5) && canImport(_Concurrency)
38-
extension Metric_Events_DebugInfo: @unchecked Sendable {}
39-
#endif // swift(>=5.5) && canImport(_Concurrency)
40-
4137
// MARK: - Code below here is support for the SwiftProtobuf runtime.
4238

4339
fileprivate let _protobuf_package = "metric.events"

Flipper/Packages/Analytics/Sources/Protobuf/events/flipper_gatt_info.pb.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// DO NOT EDIT.
22
// swift-format-ignore-file
3+
// swiftlint:disable all
34
//
45
// Generated by the Swift generator plugin for the protocol buffer compiler.
56
// Source: events/flipper_gatt_info.proto
67
//
78
// For information on using the generated types, please see the documentation:
89
// https://github.com/apple/swift-protobuf/
910

10-
import Foundation
1111
import SwiftProtobuf
1212

1313
// If the compiler emits an error on this type, it is because this file
@@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
2020
typealias Version = _2
2121
}
2222

23-
struct Metric_Events_FlipperGattInfo {
23+
struct Metric_Events_FlipperGattInfo: Sendable {
2424
// SwiftProtobuf.Message conformance is added in an extension below. See the
2525
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
2626
// methods supported on all messages.
@@ -32,10 +32,6 @@ struct Metric_Events_FlipperGattInfo {
3232
init() {}
3333
}
3434

35-
#if swift(>=5.5) && canImport(_Concurrency)
36-
extension Metric_Events_FlipperGattInfo: @unchecked Sendable {}
37-
#endif // swift(>=5.5) && canImport(_Concurrency)
38-
3935
// MARK: - Code below here is support for the SwiftProtobuf runtime.
4036

4137
fileprivate let _protobuf_package = "metric.events"

Flipper/Packages/Analytics/Sources/Protobuf/events/flipper_rpc_info.pb.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// DO NOT EDIT.
22
// swift-format-ignore-file
3+
// swiftlint:disable all
34
//
45
// Generated by the Swift generator plugin for the protocol buffer compiler.
56
// Source: events/flipper_rpc_info.proto
67
//
78
// For information on using the generated types, please see the documentation:
89
// https://github.com/apple/swift-protobuf/
910

10-
import Foundation
1111
import SwiftProtobuf
1212

1313
// If the compiler emits an error on this type, it is because this file
@@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
2020
typealias Version = _2
2121
}
2222

23-
struct Metric_Events_FlipperRpcInfo {
23+
struct Metric_Events_FlipperRpcInfo: Sendable {
2424
// SwiftProtobuf.Message conformance is added in an extension below. See the
2525
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
2626
// methods supported on all messages.
@@ -44,10 +44,6 @@ struct Metric_Events_FlipperRpcInfo {
4444
init() {}
4545
}
4646

47-
#if swift(>=5.5) && canImport(_Concurrency)
48-
extension Metric_Events_FlipperRpcInfo: @unchecked Sendable {}
49-
#endif // swift(>=5.5) && canImport(_Concurrency)
50-
5147
// MARK: - Code below here is support for the SwiftProtobuf runtime.
5248

5349
fileprivate let _protobuf_package = "metric.events"

Flipper/Packages/Analytics/Sources/Protobuf/events/open.pb.swift

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// DO NOT EDIT.
22
// swift-format-ignore-file
3+
// swiftlint:disable all
34
//
45
// Generated by the Swift generator plugin for the protocol buffer compiler.
56
// Source: events/open.proto
67
//
78
// For information on using the generated types, please see the documentation:
89
// https://github.com/apple/swift-protobuf/
910

10-
import Foundation
1111
import SwiftProtobuf
1212

1313
// If the compiler emits an error on this type, it is because this file
@@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
2020
typealias Version = _2
2121
}
2222

23-
struct Metric_Events_Open {
23+
struct Metric_Events_Open: Sendable {
2424
// SwiftProtobuf.Message conformance is added in an extension below. See the
2525
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
2626
// methods supported on all messages.
@@ -31,7 +31,7 @@ struct Metric_Events_Open {
3131

3232
var unknownFields = SwiftProtobuf.UnknownStorage()
3333

34-
enum OpenTarget: SwiftProtobuf.Enum {
34+
enum OpenTarget: SwiftProtobuf.Enum, Swift.CaseIterable {
3535
typealias RawValue = Int
3636
case app // = 0
3737
case saveKey // = 1
@@ -52,6 +52,8 @@ struct Metric_Events_Open {
5252
case openFaphubApp // = 16
5353
case installFaphubApp // = 17
5454
case hideFaphubApp // = 18
55+
case openInfraredLibrary // = 19
56+
case saveInfraredLibrary // = 20
5557
case UNRECOGNIZED(Int)
5658

5759
init() {
@@ -79,6 +81,8 @@ struct Metric_Events_Open {
7981
case 16: self = .openFaphubApp
8082
case 17: self = .installFaphubApp
8183
case 18: self = .hideFaphubApp
84+
case 19: self = .openInfraredLibrary
85+
case 20: self = .saveInfraredLibrary
8286
default: self = .UNRECOGNIZED(rawValue)
8387
}
8488
}
@@ -104,49 +108,42 @@ struct Metric_Events_Open {
104108
case .openFaphubApp: return 16
105109
case .installFaphubApp: return 17
106110
case .hideFaphubApp: return 18
111+
case .openInfraredLibrary: return 19
112+
case .saveInfraredLibrary: return 20
107113
case .UNRECOGNIZED(let i): return i
108114
}
109115
}
110116

117+
// The compiler won't synthesize support with the UNRECOGNIZED case.
118+
static let allCases: [Metric_Events_Open.OpenTarget] = [
119+
.app,
120+
.saveKey,
121+
.emulate,
122+
.edit,
123+
.share,
124+
.experimentalFm,
125+
.experimentalScreenstreaming,
126+
.shareShortlink,
127+
.shareLonglink,
128+
.shareFile,
129+
.saveDump,
130+
.mfkey32,
131+
.openNfcDumpEditor,
132+
.openFaphub,
133+
.openFaphubCategory,
134+
.openFaphubSearch,
135+
.openFaphubApp,
136+
.installFaphubApp,
137+
.hideFaphubApp,
138+
.openInfraredLibrary,
139+
.saveInfraredLibrary,
140+
]
141+
111142
}
112143

113144
init() {}
114145
}
115146

116-
#if swift(>=4.2)
117-
118-
extension Metric_Events_Open.OpenTarget: CaseIterable {
119-
// The compiler won't synthesize support with the UNRECOGNIZED case.
120-
static let allCases: [Metric_Events_Open.OpenTarget] = [
121-
.app,
122-
.saveKey,
123-
.emulate,
124-
.edit,
125-
.share,
126-
.experimentalFm,
127-
.experimentalScreenstreaming,
128-
.shareShortlink,
129-
.shareLonglink,
130-
.shareFile,
131-
.saveDump,
132-
.mfkey32,
133-
.openNfcDumpEditor,
134-
.openFaphub,
135-
.openFaphubCategory,
136-
.openFaphubSearch,
137-
.openFaphubApp,
138-
.installFaphubApp,
139-
.hideFaphubApp,
140-
]
141-
}
142-
143-
#endif // swift(>=4.2)
144-
145-
#if swift(>=5.5) && canImport(_Concurrency)
146-
extension Metric_Events_Open: @unchecked Sendable {}
147-
extension Metric_Events_Open.OpenTarget: @unchecked Sendable {}
148-
#endif // swift(>=5.5) && canImport(_Concurrency)
149-
150147
// MARK: - Code below here is support for the SwiftProtobuf runtime.
151148

152149
fileprivate let _protobuf_package = "metric.events"
@@ -210,5 +207,7 @@ extension Metric_Events_Open.OpenTarget: SwiftProtobuf._ProtoNameProviding {
210207
16: .same(proto: "OPEN_FAPHUB_APP"),
211208
17: .same(proto: "INSTALL_FAPHUB_APP"),
212209
18: .same(proto: "HIDE_FAPHUB_APP"),
210+
19: .same(proto: "OPEN_INFRARED_LIBRARY"),
211+
20: .same(proto: "SAVE_INFRARED_LIBRARY"),
213212
]
214213
}

Flipper/Packages/Analytics/Sources/Protobuf/events/sub_ghz_provisioning.pb.swift

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// DO NOT EDIT.
22
// swift-format-ignore-file
3+
// swiftlint:disable all
34
//
45
// Generated by the Swift generator plugin for the protocol buffer compiler.
56
// Source: events/sub_ghz_provisioning.proto
67
//
78
// For information on using the generated types, please see the documentation:
89
// https://github.com/apple/swift-protobuf/
910

10-
import Foundation
1111
import SwiftProtobuf
1212

1313
// If the compiler emits an error on this type, it is because this file
@@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
2020
typealias Version = _2
2121
}
2222

23-
struct Metric_Events_SubGhzProvisioning {
23+
struct Metric_Events_SubGhzProvisioning: Sendable {
2424
// SwiftProtobuf.Message conformance is added in an extension below. See the
2525
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
2626
// methods supported on all messages.
@@ -43,7 +43,7 @@ struct Metric_Events_SubGhzProvisioning {
4343

4444
var unknownFields = SwiftProtobuf.UnknownStorage()
4545

46-
enum RegionSource: SwiftProtobuf.Enum {
46+
enum RegionSource: SwiftProtobuf.Enum, Swift.CaseIterable {
4747
typealias RawValue = Int
4848
case simNetwork // = 0
4949
case simCountry // = 1
@@ -78,31 +78,20 @@ struct Metric_Events_SubGhzProvisioning {
7878
}
7979
}
8080

81+
// The compiler won't synthesize support with the UNRECOGNIZED case.
82+
static let allCases: [Metric_Events_SubGhzProvisioning.RegionSource] = [
83+
.simNetwork,
84+
.simCountry,
85+
.geoIp,
86+
.system,
87+
.default,
88+
]
89+
8190
}
8291

8392
init() {}
8493
}
8594

86-
#if swift(>=4.2)
87-
88-
extension Metric_Events_SubGhzProvisioning.RegionSource: CaseIterable {
89-
// The compiler won't synthesize support with the UNRECOGNIZED case.
90-
static let allCases: [Metric_Events_SubGhzProvisioning.RegionSource] = [
91-
.simNetwork,
92-
.simCountry,
93-
.geoIp,
94-
.system,
95-
.default,
96-
]
97-
}
98-
99-
#endif // swift(>=4.2)
100-
101-
#if swift(>=5.5) && canImport(_Concurrency)
102-
extension Metric_Events_SubGhzProvisioning: @unchecked Sendable {}
103-
extension Metric_Events_SubGhzProvisioning.RegionSource: @unchecked Sendable {}
104-
#endif // swift(>=5.5) && canImport(_Concurrency)
105-
10695
// MARK: - Code below here is support for the SwiftProtobuf runtime.
10796

10897
fileprivate let _protobuf_package = "metric.events"

Flipper/Packages/Analytics/Sources/Protobuf/events/synchronization_end.pb.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// DO NOT EDIT.
22
// swift-format-ignore-file
3+
// swiftlint:disable all
34
//
45
// Generated by the Swift generator plugin for the protocol buffer compiler.
56
// Source: events/synchronization_end.proto
67
//
78
// For information on using the generated types, please see the documentation:
89
// https://github.com/apple/swift-protobuf/
910

10-
import Foundation
1111
import SwiftProtobuf
1212

1313
// If the compiler emits an error on this type, it is because this file
@@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
2020
typealias Version = _2
2121
}
2222

23-
struct Metric_Events_SynchronizationEnd {
23+
struct Metric_Events_SynchronizationEnd: Sendable {
2424
// SwiftProtobuf.Message conformance is added in an extension below. See the
2525
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
2626
// methods supported on all messages.
@@ -44,10 +44,6 @@ struct Metric_Events_SynchronizationEnd {
4444
init() {}
4545
}
4646

47-
#if swift(>=5.5) && canImport(_Concurrency)
48-
extension Metric_Events_SynchronizationEnd: @unchecked Sendable {}
49-
#endif // swift(>=5.5) && canImport(_Concurrency)
50-
5147
// MARK: - Code below here is support for the SwiftProtobuf runtime.
5248

5349
fileprivate let _protobuf_package = "metric.events"

0 commit comments

Comments
 (0)