From a1a7596b3e0b112c35f1526eba8b027240718569 Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Wed, 7 Oct 2020 10:08:05 -0700 Subject: [PATCH 01/16] Lock Tag icon height for time-being to prevent parent view rendering issues --- Emitron/Emitron/UI/Shared/Tags/TagView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Emitron/Emitron/UI/Shared/Tags/TagView.swift b/Emitron/Emitron/UI/Shared/Tags/TagView.swift index 1f7e5fdb..2e93a57d 100644 --- a/Emitron/Emitron/UI/Shared/Tags/TagView.swift +++ b/Emitron/Emitron/UI/Shared/Tags/TagView.swift @@ -29,6 +29,7 @@ import SwiftUI struct TagView: View { + private static let defaultIconHeight: CGFloat = 12.0 private struct SizeKey: PreferenceKey { static func reduce(value: inout CGSize?, nextValue: () -> CGSize?) { value = value ?? nextValue() @@ -49,7 +50,7 @@ struct TagView: View { .resizable() .aspectRatio(contentMode: .fit) .foregroundColor(textColor) - .frame(height: height) + .frame(height: Self.defaultIconHeight) Text(text.uppercased()) .foregroundColor(textColor) From ca772004de9d424afa9b602d917762cd09356dac Mon Sep 17 00:00:00 2001 From: zoha131 Date: Sun, 11 Oct 2020 20:31:50 +0600 Subject: [PATCH 02/16] Add a helper method to get the appropriate list of SettingsOption In the future, if we want to add more SettingsOption then we need to change just a single file :] --- Emitron/Emitron/Models/SettingsOption.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Emitron/Emitron/Models/SettingsOption.swift b/Emitron/Emitron/Models/SettingsOption.swift index 0e25f86f..9b33941d 100644 --- a/Emitron/Emitron/Models/SettingsOption.swift +++ b/Emitron/Emitron/Models/SettingsOption.swift @@ -84,3 +84,14 @@ enum SettingsOption: Int, Identifiable, CaseIterable { } } } + +// MARK: - Option Selection +extension SettingsOption { + static func getOptions(for canDownload: Bool) -> [SettingsOption] { + if canDownload { + return SettingsOption.allCases + } else { + return [.playbackSpeed, .closedCaptionOn] + } + } +} From 5ca95cd9da6484dbb2042e45a54a01f8eb51f7d2 Mon Sep 17 00:00:00 2001 From: zoha131 Date: Sun, 11 Oct 2020 20:58:20 +0600 Subject: [PATCH 03/16] Hide download settings from the users who don't have download access fix issue #495 --- Emitron/Emitron/UI/Settings/SettingsList.swift | 8 +++++--- Emitron/Emitron/UI/Settings/SettingsView.swift | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Emitron/Emitron/UI/Settings/SettingsList.swift b/Emitron/Emitron/UI/Settings/SettingsList.swift index 2a6690e0..98f96180 100644 --- a/Emitron/Emitron/UI/Settings/SettingsList.swift +++ b/Emitron/Emitron/UI/Settings/SettingsList.swift @@ -30,13 +30,14 @@ import SwiftUI struct SettingsList { @ObservedObject private var settingsManager: SettingsManager + private var canDownload: Bool } // MARK: - View extension SettingsList: View { var body: some View { VStack(spacing: 0) { - ForEach(SettingsOption.allCases) { self[$0] } + ForEach(SettingsOption.getOptions(for: canDownload)) { self[$0] } } } } @@ -48,15 +49,16 @@ struct SettingsList_Previews: PreviewProvider { } static var list: some View { - SettingsList( settingsManager: .init(initialValue: .current) ) + SettingsList(settingsManager: .init(initialValue: .current), canDownload: true) .background(Color.backgroundColor) } } // MARK: - internal extension SettingsList { - init(settingsManager: ObservedObject) { + init(settingsManager: ObservedObject, canDownload: Bool) { _settingsManager = settingsManager + self.canDownload = canDownload } } diff --git a/Emitron/Emitron/UI/Settings/SettingsView.swift b/Emitron/Emitron/UI/Settings/SettingsView.swift index 4feff105..8e309b2d 100644 --- a/Emitron/Emitron/UI/Settings/SettingsView.swift +++ b/Emitron/Emitron/UI/Settings/SettingsView.swift @@ -45,7 +45,10 @@ struct SettingsView: View { var body: some View { NavigationView { VStack { - SettingsList(settingsManager: _settingsManager) + SettingsList( + settingsManager: _settingsManager, + canDownload: sessionController.user?.canDownload ?? false + ) .navigationBarTitle(String.settings) .navigationBarItems(trailing: dismissButton) .padding([.horizontal], 20) From 1902d0be1cf022f047892687f532f8556e306a7f Mon Sep 17 00:00:00 2001 From: Brian Moakley Date: Tue, 27 Oct 2020 10:26:05 -0400 Subject: [PATCH 04/16] Disable sort controls when fetching data --- .../Colours/Text/Contents.json | 6 +-- .../Contents.json | 38 +++++++++++++++++++ Emitron/Emitron/UI/Library/LibraryView.swift | 28 +++++++++++--- 3 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 Emitron/Emitron/Assets.xcassets/Colours/Text/textButtonTextDisabled.colorset/Contents.json diff --git a/Emitron/Emitron/Assets.xcassets/Colours/Text/Contents.json b/Emitron/Emitron/Assets.xcassets/Colours/Text/Contents.json index da4a164c..73c00596 100644 --- a/Emitron/Emitron/Assets.xcassets/Colours/Text/Contents.json +++ b/Emitron/Emitron/Assets.xcassets/Colours/Text/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Emitron/Emitron/Assets.xcassets/Colours/Text/textButtonTextDisabled.colorset/Contents.json b/Emitron/Emitron/Assets.xcassets/Colours/Text/textButtonTextDisabled.colorset/Contents.json new file mode 100644 index 00000000..d2808066 --- /dev/null +++ b/Emitron/Emitron/Assets.xcassets/Colours/Text/textButtonTextDisabled.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Emitron/Emitron/UI/Library/LibraryView.swift b/Emitron/Emitron/UI/Library/LibraryView.swift index 5b796de7..e60e6c60 100644 --- a/Emitron/Emitron/UI/Library/LibraryView.swift +++ b/Emitron/Emitron/UI/Library/LibraryView.swift @@ -27,6 +27,7 @@ // THE SOFTWARE. import SwiftUI +import Combine private extension CGFloat { static let filterButtonSide: CGFloat = 27 @@ -39,6 +40,7 @@ struct LibraryView: View { @ObservedObject var filters: Filters @ObservedObject var libraryRepository: LibraryRepository @State var filtersPresented: Bool = false + @State var isSorting: Bool = true var body: some View { contentView @@ -49,8 +51,16 @@ struct LibraryView: View { FiltersView(libraryRepository: libraryRepository, filters: filters) .background(Color.backgroundColor.edgesIgnoringSafeArea(.all)) } + .onReceive(Just(contentView)) {_ in + switch libraryRepository.state { + case .loading, .loadingAdditional: + isSorting = true + default: + isSorting = false + } + } } - + private var contentControlsSection: some View { VStack { searchAndFilterControls @@ -104,12 +114,17 @@ struct LibraryView: View { HStack { Image("sort") .foregroundColor(.textButtonText) - - Text(filters.sortFilter.name) - .font(.uiLabelBold) - .foregroundColor(.textButtonText) + if isSorting { + Text(filters.sortFilter.name) + .font(.uiLabel) + .foregroundColor(Color.gray) + } else { + Text(filters.sortFilter.name) + .font(.uiLabelBold) + .foregroundColor(.textButtonText) + } } - } + }.disabled(isSorting) } } @@ -147,6 +162,7 @@ struct LibraryView: View { } private func changeSort() { + isSorting = true filters.changeSortFilter() libraryRepository.filters = filters } From 893a4a38a7f37297f30fe047b9a9d259571b456f Mon Sep 17 00:00:00 2001 From: Brian Moakley Date: Tue, 27 Oct 2020 16:06:38 -0400 Subject: [PATCH 05/16] Change the filter view per Luke's design --- .../Library/Filtering/FiltersHeaderView.swift | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Emitron/Emitron/UI/Library/Filtering/FiltersHeaderView.swift b/Emitron/Emitron/UI/Library/Filtering/FiltersHeaderView.swift index 3c14f2ea..af576502 100644 --- a/Emitron/Emitron/UI/Library/Filtering/FiltersHeaderView.swift +++ b/Emitron/Emitron/UI/Library/Filtering/FiltersHeaderView.swift @@ -50,13 +50,13 @@ struct FiltersHeaderView: View { isExpanded.toggle() }) { HStack { - Text(filterGroup.type.name) + Text("\(filterGroup.type.name)\(filterCount)") .foregroundColor(.titleText) .font(.uiLabelBold) Spacer() - - Text(isExpanded ? "Hide (\(numOfOnFilters))" : "Show (\(numOfOnFilters))") + + Image(systemName: isExpanded ? "chevron.up" : "chevron.down") .foregroundColor(.contentText) .font(.uiLabelBold) } @@ -72,11 +72,18 @@ struct FiltersHeaderView: View { } } } - + + private var filterCount: String { + if numOfOnFilters > 0 { + return "・\(numOfOnFilters)" + } + return "" + } + private var numOfOnFilters: Int { filterGroup.filters.filter(\.isOn).count } - + private var expandedView: some View { VStack(alignment: .leading, spacing: 8) { ForEach(Array(filterGroup.filters), id: \.self) { filter in From 09912a47cbc623e2f765f6c8c3245f346be539f5 Mon Sep 17 00:00:00 2001 From: Brian Moakley Date: Tue, 27 Oct 2020 16:35:53 -0400 Subject: [PATCH 06/16] Change subscription filter fix to be specific per request --- Emitron/Emitron/Models/ContentSubscriptionPlan.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emitron/Emitron/Models/ContentSubscriptionPlan.swift b/Emitron/Emitron/Models/ContentSubscriptionPlan.swift index 93b5b073..98bc525c 100644 --- a/Emitron/Emitron/Models/ContentSubscriptionPlan.swift +++ b/Emitron/Emitron/Models/ContentSubscriptionPlan.swift @@ -37,9 +37,9 @@ enum ContentSubscriptionPlan: Int, Codable { var displayString: String { switch self { case .beginner: - return "Beginner" + return "Beginner Subscription" case .professional: - return "Professional" + return "Professional Subscription" } } From 4121296f3d453acbd6c38f83bb0756c701e2e995 Mon Sep 17 00:00:00 2001 From: Brian Moakley Date: Wed, 28 Oct 2020 17:24:15 -0400 Subject: [PATCH 07/16] Remove isSorting property --- Emitron/Emitron/UI/Library/LibraryView.swift | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Emitron/Emitron/UI/Library/LibraryView.swift b/Emitron/Emitron/UI/Library/LibraryView.swift index e60e6c60..c8e03fe4 100644 --- a/Emitron/Emitron/UI/Library/LibraryView.swift +++ b/Emitron/Emitron/UI/Library/LibraryView.swift @@ -40,7 +40,6 @@ struct LibraryView: View { @ObservedObject var filters: Filters @ObservedObject var libraryRepository: LibraryRepository @State var filtersPresented: Bool = false - @State var isSorting: Bool = true var body: some View { contentView @@ -51,14 +50,6 @@ struct LibraryView: View { FiltersView(libraryRepository: libraryRepository, filters: filters) .background(Color.backgroundColor.edgesIgnoringSafeArea(.all)) } - .onReceive(Just(contentView)) {_ in - switch libraryRepository.state { - case .loading, .loadingAdditional: - isSorting = true - default: - isSorting = false - } - } } private var contentControlsSection: some View { @@ -114,7 +105,7 @@ struct LibraryView: View { HStack { Image("sort") .foregroundColor(.textButtonText) - if isSorting { + if [.loading, .loadingAdditional].contains(libraryRepository.state) { Text(filters.sortFilter.name) .font(.uiLabel) .foregroundColor(Color.gray) @@ -124,7 +115,7 @@ struct LibraryView: View { .foregroundColor(.textButtonText) } } - }.disabled(isSorting) + }.disabled(libraryRepository.state == .loading || libraryRepository.state == .loadingAdditional) } } @@ -162,7 +153,6 @@ struct LibraryView: View { } private func changeSort() { - isSorting = true filters.changeSortFilter() libraryRepository.filters = filters } From fd24dc140e3f8b1e7803ac9a573fb43ab8a41c7d Mon Sep 17 00:00:00 2001 From: Brian Moakley Date: Thu, 29 Oct 2020 13:07:47 -0400 Subject: [PATCH 08/16] Make disabled modifier use consistent code and remove Combine import --- Emitron/Emitron/UI/Library/LibraryView.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Emitron/Emitron/UI/Library/LibraryView.swift b/Emitron/Emitron/UI/Library/LibraryView.swift index c8e03fe4..fdada262 100644 --- a/Emitron/Emitron/UI/Library/LibraryView.swift +++ b/Emitron/Emitron/UI/Library/LibraryView.swift @@ -27,7 +27,6 @@ // THE SOFTWARE. import SwiftUI -import Combine private extension CGFloat { static let filterButtonSide: CGFloat = 27 @@ -115,7 +114,7 @@ struct LibraryView: View { .foregroundColor(.textButtonText) } } - }.disabled(libraryRepository.state == .loading || libraryRepository.state == .loadingAdditional) + }.disabled([.loading, .loadingAdditional].contains(libraryRepository.state)) } } From c6013e1674168ddd9537e25570596f9abfc0ff26 Mon Sep 17 00:00:00 2001 From: Franklin Byaruhanga Date: Tue, 3 Nov 2020 16:32:25 +0200 Subject: [PATCH 09/16] Set the Color of the space to Color.backgroundColor This fixes Black bar after downloaded course's issue #513 --- Emitron/Emitron/UI/Shared/Content List/ContentListView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emitron/Emitron/UI/Shared/Content List/ContentListView.swift b/Emitron/Emitron/UI/Shared/Content List/ContentListView.swift index b3ea34a1..54cfcbe7 100644 --- a/Emitron/Emitron/UI/Shared/Content List/ContentListView.swift +++ b/Emitron/Emitron/UI/Shared/Content List/ContentListView.swift @@ -93,7 +93,7 @@ private extension ContentListView { cardsView loadMoreView // Hack to make sure there's some spacing at the bottom of the list - Color.clear.frame(height: 0) + Color.backgroundColor } } From 6df770ca3d22dd610119281f95d43aba5b8a985e Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Tue, 3 Nov 2020 18:13:37 -0800 Subject: [PATCH 10/16] TabView Refactor Fixing swiftlint issue --- Emitron/Emitron/UI/Shared/Tags/TagView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Emitron/Emitron/UI/Shared/Tags/TagView.swift b/Emitron/Emitron/UI/Shared/Tags/TagView.swift index 2e93a57d..0c134652 100644 --- a/Emitron/Emitron/UI/Shared/Tags/TagView.swift +++ b/Emitron/Emitron/UI/Shared/Tags/TagView.swift @@ -30,6 +30,7 @@ import SwiftUI struct TagView: View { private static let defaultIconHeight: CGFloat = 12.0 + private struct SizeKey: PreferenceKey { static func reduce(value: inout CGSize?, nextValue: () -> CGSize?) { value = value ?? nextValue() From 6ec24add500452219036639d7384c690e2edac26 Mon Sep 17 00:00:00 2001 From: Franklin Byaruhanga Date: Sat, 7 Nov 2020 08:02:03 +0200 Subject: [PATCH 11/16] Add Spacer()'s to vertically centered Illustration This fixes Welcome: Illustration vertical alignment issue #518 --- Emitron/Emitron/UI/App Root/LoginView.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Emitron/Emitron/UI/App Root/LoginView.swift b/Emitron/Emitron/UI/App Root/LoginView.swift index 0fe26084..5dcd856e 100644 --- a/Emitron/Emitron/UI/App Root/LoginView.swift +++ b/Emitron/Emitron/UI/App Root/LoginView.swift @@ -41,6 +41,7 @@ struct LoginView: View { PagerView(pageCount: 2, showIndicator: true) { VStack { + Spacer() Image("welcomeArtwork1") .resizable() .aspectRatio(contentMode: .fit) @@ -57,6 +58,7 @@ struct LoginView: View { .font(.uiLabel) .foregroundColor(.contentText) .multilineTextAlignment(.center) + Spacer() } .background(Color.backgroundColor) From 7ced7aebce5292e422ba5cc58461b447e115a9cb Mon Sep 17 00:00:00 2001 From: Franklin Byaruhanga Date: Tue, 10 Nov 2020 09:42:41 +0200 Subject: [PATCH 12/16] Fix the following SwiftLint warnings SnapshotHelper.swift:251:7: Inclusive Language Violation: Declaration hasWhiteListedIdentifier contains the term "whitelist" which is not considered inclusive. (inclusive_language) SnapshotHelper.swift:252:9: Inclusive Language Violation: Declaration whiteListedIdentifiers contains the term "whitelist" which is not considered inclusive. (inclusive_language) Constants.swift:49:20: Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used. (operator_usage_whitespace) JSONAPIRelationship.swift:35:30: Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used. (operator_usage_whitespace) JSONAPIDocument.swift:36:30: Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used. (operator_usage_whitespace) Parameters.swift:209:12: Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used. (operator_usage_whitespace) DownloadService.swift:558:54: Unused Closure Parameter Violation: Unused parameter "path" in a closure should be replaced with _. (unused_closure_parameter) --- Emitron/Emitron/Constants.swift | 2 +- Emitron/Emitron/Downloads/DownloadService.swift | 2 +- Emitron/Emitron/Networking/JSONAPI/JSONAPIDocument.swift | 2 +- .../Emitron/Networking/JSONAPI/JSONAPIRelationship.swift | 2 +- Emitron/Emitron/Networking/Requests/Parameters.swift | 2 +- Emitron/emitronScreenshots/SnapshotHelper.swift | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Emitron/Emitron/Constants.swift b/Emitron/Emitron/Constants.swift index d0f59aaf..ce933268 100644 --- a/Emitron/Emitron/Constants.swift +++ b/Emitron/Emitron/Constants.swift @@ -46,7 +46,7 @@ extension String { static let library = "Library" static let loading = "Loading…" static let myTutorials = "My Tutorials" - static let newest = "Newest" + static let newest = "Newest" static let popularity = "Popularity" static let resetFilters = "Reset Filters" static let search = "Search…" diff --git a/Emitron/Emitron/Downloads/DownloadService.swift b/Emitron/Emitron/Downloads/DownloadService.swift index 00503fbb..5804e607 100644 --- a/Emitron/Emitron/Downloads/DownloadService.swift +++ b/Emitron/Emitron/Downloads/DownloadService.swift @@ -555,7 +555,7 @@ extension DownloadService { extension DownloadService { private func configureWifiObservation() { // Track the network status - networkMonitor.pathUpdateHandler = { [weak self] path in + networkMonitor.pathUpdateHandler = { [weak self] _ in self?.checkQueueStatus() } networkMonitor.start(queue: DispatchQueue.global(qos: .utility)) diff --git a/Emitron/Emitron/Networking/JSONAPI/JSONAPIDocument.swift b/Emitron/Emitron/Networking/JSONAPI/JSONAPIDocument.swift index 2fc24bbf..f97629f4 100644 --- a/Emitron/Emitron/Networking/JSONAPI/JSONAPIDocument.swift +++ b/Emitron/Emitron/Networking/JSONAPI/JSONAPIDocument.swift @@ -33,7 +33,7 @@ class JSONAPIDocument { // MARK: - Properties var meta: [String: Any] = [:] var included: [JSONAPIResource] = [] - var data: [JSONAPIResource] = [] + var data: [JSONAPIResource] = [] var errors: [JSONAPIError] = [] var links: [String: URL] = [:] diff --git a/Emitron/Emitron/Networking/JSONAPI/JSONAPIRelationship.swift b/Emitron/Emitron/Networking/JSONAPI/JSONAPIRelationship.swift index 23a3fa8b..072acedb 100644 --- a/Emitron/Emitron/Networking/JSONAPI/JSONAPIRelationship.swift +++ b/Emitron/Emitron/Networking/JSONAPI/JSONAPIRelationship.swift @@ -32,7 +32,7 @@ import SwiftyJSON public class JSONAPIRelationship { // MARK: - Properties var meta: [String: Any] = [:] - var data: [JSONAPIResource] = [] + var data: [JSONAPIResource] = [] var links: [String: URL] = [:] var type: String = "" diff --git a/Emitron/Emitron/Networking/Requests/Parameters.swift b/Emitron/Emitron/Networking/Requests/Parameters.swift index f18081b6..e68c88ca 100644 --- a/Emitron/Emitron/Networking/Requests/Parameters.swift +++ b/Emitron/Emitron/Networking/Requests/Parameters.swift @@ -206,7 +206,7 @@ enum Param { static func sort(for value: ParameterSortValue, descending: Bool) -> Parameter { - let key = "sort" + let key = "sort" let value = "\(descending ? "-" : "")\(value.rawValue)" return Parameter(key: key, value: value, displayName: "Sort", sortOrdinal: 0) diff --git a/Emitron/emitronScreenshots/SnapshotHelper.swift b/Emitron/emitronScreenshots/SnapshotHelper.swift index baefa99d..0c253881 100644 --- a/Emitron/emitronScreenshots/SnapshotHelper.swift +++ b/Emitron/emitronScreenshots/SnapshotHelper.swift @@ -238,7 +238,7 @@ open class Snapshot: NSObject { private extension XCUIElementAttributes { var isNetworkLoadingIndicator: Bool { - if hasWhiteListedIdentifier { + if hasAllowedIdentifier { return false } @@ -248,10 +248,10 @@ private extension XCUIElementAttributes { return hasOldLoadingIndicatorSize || hasNewLoadingIndicatorSize } - var hasWhiteListedIdentifier: Bool { - let whiteListedIdentifiers = ["GeofenceLocationTrackingOn", "StandardLocationTrackingOn"] + var hasAllowedIdentifier: Bool { + let allowedIdentifiers = ["GeofenceLocationTrackingOn", "StandardLocationTrackingOn"] - return whiteListedIdentifiers.contains(identifier) + return allowedIdentifiers.contains(identifier) } func isStatusBar(_ deviceWidth: CGFloat) -> Bool { From bd79db23666592a57f62a673076d7ce7ddc39524 Mon Sep 17 00:00:00 2001 From: Franklin Byaruhanga Date: Tue, 10 Nov 2020 10:15:28 +0200 Subject: [PATCH 13/16] Update swiftlint.yml --- .github/workflows/swiftlint.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index b54caa63..6e848069 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -9,10 +9,13 @@ on: jobs: SwiftLint: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - uses: actions/checkout@v1 - - name: GitHub Action for SwiftLint - uses: norio-nomura/action-swiftlint@3.1.0 + - name: Install Swiftlint + run: brew install swiftlint + + - name: Run Swiftlint + run: swiftlint with: args: --config Emitron/.swiftlint.yml From 23271554c46d987e3c11da1410bba35ba4a21084 Mon Sep 17 00:00:00 2001 From: Franklin Byaruhanga Date: Tue, 10 Nov 2020 10:36:41 +0200 Subject: [PATCH 14/16] Update swiftlint.yml --- .github/workflows/swiftlint.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index 6e848069..ba5023f4 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -16,6 +16,4 @@ jobs: run: brew install swiftlint - name: Run Swiftlint - run: swiftlint - with: - args: --config Emitron/.swiftlint.yml + run: swiftlint --config Emitron/.swiftlint.yml From 8f4c3319489aa33591023c1d64f9065f4502377a Mon Sep 17 00:00:00 2001 From: Franklin Byaruhanga Date: Tue, 10 Nov 2020 11:41:19 +0200 Subject: [PATCH 15/16] Updating guardpost with the retrieved permissions Guardpost was not aware of user permission hence calling destroyDownloads() function. This would remove all downloaded video's This fixes the issue #506 --- Emitron/Emitron/Sessions/SessionController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emitron/Emitron/Sessions/SessionController.swift b/Emitron/Emitron/Sessions/SessionController.swift index 6630d654..6130f0ba 100644 --- a/Emitron/Emitron/Sessions/SessionController.swift +++ b/Emitron/Emitron/Sessions/SessionController.swift @@ -196,7 +196,7 @@ class SessionController: NSObject, UserModelController, ObservablePrePostFactoOb // Update the user self.user = user.with(permissions: permissions) // Ensure guardpost is aware, and hence the keychain is updated - self.guardpost.updateUser(with: user) + self.guardpost.updateUser(with: self.user) } } } From 2bc39d4d4479e3ae17dd6df4327fedac869fe7c6 Mon Sep 17 00:00:00 2001 From: Sam Davies Date: Wed, 11 Nov 2020 11:51:54 +0000 Subject: [PATCH 16/16] =?UTF-8?q?emitron-ios-1.0.6:=20=F0=9F=90=BCmonium?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Emitron/Emitron.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Emitron/Emitron.xcodeproj/project.pbxproj b/Emitron/Emitron.xcodeproj/project.pbxproj index a4ad81e4..a0ea10e7 100644 --- a/Emitron/Emitron.xcodeproj/project.pbxproj +++ b/Emitron/Emitron.xcodeproj/project.pbxproj @@ -2394,7 +2394,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.5; + MARKETING_VERSION = 1.0.6; PRODUCT_BUNDLE_IDENTIFIER = "com.razeware.emitron.ios$(BUNDLE_ID_SUFFIX)"; PRODUCT_MODULE_NAME = Emitron; PRODUCT_NAME = raywenderlich; @@ -2599,7 +2599,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.5; + MARKETING_VERSION = 1.0.6; PRODUCT_BUNDLE_IDENTIFIER = "com.razeware.emitron.ios$(BUNDLE_ID_SUFFIX)"; PRODUCT_MODULE_NAME = Emitron; PRODUCT_NAME = raywenderlich; @@ -2625,7 +2625,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.5; + MARKETING_VERSION = 1.0.6; PRODUCT_BUNDLE_IDENTIFIER = "com.razeware.emitron.ios$(BUNDLE_ID_SUFFIX)"; PRODUCT_MODULE_NAME = Emitron; PRODUCT_NAME = raywenderlich;