Skip to content

Commit 3467801

Browse files
authored
[PM-39153] chore: Fix trivial warnings (#2800)
1 parent 66a5f60 commit 3467801

6 files changed

Lines changed: 15 additions & 9 deletions

File tree

AuthenticatorShared/UI/Vault/ItemList/ItemList/ItemListView.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,11 @@ private struct SearchableItemListView: View { // swiftlint:disable:this type_bod
276276
private func groupView(title: String?, items: [ItemListItem]) -> some View {
277277
LazyVStack(alignment: .leading, spacing: 7) {
278278
if let title = title?.nilIfEmpty {
279-
ExpandableHeaderView(title: title, count: items.count, buttonAccessibilityIdentifier: title+"Header") {
279+
ExpandableHeaderView(
280+
title: title,
281+
count: items.count,
282+
buttonAccessibilityIdentifier: title + "Header",
283+
) {
280284
ForEach(items) { item in
281285
buildRow(item: item, isLastInSection: true)
282286
.clipShape(RoundedRectangle(cornerRadius: 10))

BitwardenShared/Core/Platform/Services/ClientService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ actor DefaultClientService: ClientService {
326326
/// - Parameter config: Config to update the flags.
327327
private func loadFlags(_ config: ServerConfig?, for client: BitwardenSdkClient) async {
328328
do {
329-
guard let config else {
329+
guard config != nil else {
330330
return
331331
}
332332

BitwardenShared/UI/Billing/PremiumPlan/PremiumPlanProcessor.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,10 @@ final class PremiumPlanProcessor: StateProcessor<
130130
)
131131
return
132132
}
133-
let subscription: PremiumSubscription
134-
if let existing = state.subscription {
135-
subscription = existing
133+
let subscription: PremiumSubscription = if let existing = state.subscription {
134+
existing
136135
} else {
137-
subscription = try await services.billingService.getSubscription()
136+
try await services.billingService.getSubscription()
138137
}
139138
state.subscription = subscription
140139
state.planStatus = subscription.status

BitwardenShared/UI/Tools/Generator/Generator/GeneratorProcessor.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ final class GeneratorProcessor: StateProcessor<GeneratorState, GeneratorAction,
8787
await reloadGeneratorOptions()
8888
await generateValue(shouldSavePassword: true)
8989
await checkLearnGeneratorActionCardEligibility()
90-
state.shouldShowUpgradedToPremiumActionCard = await services.billingService.shouldShowUpgradedToPremiumActionCard()
90+
state.shouldShowUpgradedToPremiumActionCard = await services.billingService
91+
.shouldShowUpgradedToPremiumActionCard()
9192
case .dismissLearnGeneratorActionCard:
9293
await services.stateService.setLearnGeneratorActionCardStatus(.complete)
9394
state.isLearnGeneratorActionCardEligible = false

BitwardenShared/UI/Tools/Send/Send/SendList/SendListProcessor.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ final class SendListProcessor: StateProcessor<SendListState, SendListAction, Sen
6161
case let .addItemPressed(sendType):
6262
await addNewSend(sendType: sendType)
6363
case .appeared:
64-
state.shouldShowUpgradedToPremiumActionCard = await services.billingService.shouldShowUpgradedToPremiumActionCard()
64+
state.shouldShowUpgradedToPremiumActionCard = await services.billingService
65+
.shouldShowUpgradedToPremiumActionCard()
6566
case .dismissUpgradedToPremiumActionCard:
6667
state.shouldShowUpgradedToPremiumActionCard = false
6768
await services.billingService.setUpgradedToPremiumActionCardDismissed()

BitwardenShared/UI/Vault/Vault/VaultList/VaultListProcessor.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ extension VaultListProcessor {
238238

239239
state.shouldShowArchiveOnboardingActionCard = await services.stateService.shouldDoArchiveOnboarding()
240240

241-
state.shouldShowUpgradedToPremiumActionCard = await services.billingService.shouldShowUpgradedToPremiumActionCard()
241+
state.shouldShowUpgradedToPremiumActionCard = await services.billingService
242+
.shouldShowUpgradedToPremiumActionCard()
242243

243244
let isBannerDismissed = await services.stateService.isPremiumUpgradeBannerDismissed()
244245
guard !isBannerDismissed else {

0 commit comments

Comments
 (0)