Skip to content

Commit

Permalink
rename again
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-dydx committed Sep 18, 2024
1 parent e7012a4 commit f77cf4d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions dydx/dydxPresenters/dydxPresenters.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
278EA5642BB610AC007A0E17 /* dydxNotificationsSettingsViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 278EA5632BB610AC007A0E17 /* dydxNotificationsSettingsViewBuilder.swift */; };
278EA5662BB61C24007A0E17 /* KeyValueStoreProtocolStore+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 278EA5652BB61C24007A0E17 /* KeyValueStoreProtocolStore+Ext.swift */; };
27B957ED2B97C07400EF9304 /* dydxShareActionBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B957EC2B97C07400EF9304 /* dydxShareActionBuilder.swift */; };
27C027532AFD761300E92CCB /* dydxSettingsSecondaryActionsViewPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C027522AFD761300E92CCB /* dydxSettingsSecondaryActionsViewPresenter.swift */; };
27C027532AFD761300E92CCB /* dydxProfileSecondaryButtonsViewPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C027522AFD761300E92CCB /* dydxProfileSecondaryButtonsViewPresenter.swift */; };
27DB2EA32AC1E7B20047BC39 /* dydxTradeRestrictedViewPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27DB2EA22AC1E7B20047BC39 /* dydxTradeRestrictedViewPresenter.swift */; };
27E0735C2C20D2470034B963 /* dydxCancelPendingIsolatedOrdersViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27E0735B2C20D2470034B963 /* dydxCancelPendingIsolatedOrdersViewBuilder.swift */; };
314BBDE9F332ECA910BC414E /* Pods_iOS_dydxPresenters.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F1551C00FFF41C29CFC5BD94 /* Pods_iOS_dydxPresenters.framework */; };
Expand Down Expand Up @@ -554,7 +554,7 @@
278EA5632BB610AC007A0E17 /* dydxNotificationsSettingsViewBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dydxNotificationsSettingsViewBuilder.swift; sourceTree = "<group>"; };
278EA5652BB61C24007A0E17 /* KeyValueStoreProtocolStore+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "KeyValueStoreProtocolStore+Ext.swift"; sourceTree = "<group>"; };
27B957EC2B97C07400EF9304 /* dydxShareActionBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = dydxShareActionBuilder.swift; sourceTree = "<group>"; };
27C027522AFD761300E92CCB /* dydxSettingsSecondaryActionsViewPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dydxSettingsSecondaryActionsViewPresenter.swift; sourceTree = "<group>"; };
27C027522AFD761300E92CCB /* dydxProfileSecondaryButtonsViewPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dydxProfileSecondaryButtonsViewPresenter.swift; sourceTree = "<group>"; };
27DB2EA22AC1E7B20047BC39 /* dydxTradeRestrictedViewPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dydxTradeRestrictedViewPresenter.swift; sourceTree = "<group>"; };
27E0735B2C20D2470034B963 /* dydxCancelPendingIsolatedOrdersViewBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dydxCancelPendingIsolatedOrdersViewBuilder.swift; sourceTree = "<group>"; };
64487FFE2AA248340068DD87 /* dydxAlertsWorker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = dydxAlertsWorker.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -973,7 +973,7 @@
028DB33F2A05893D0090BE58 /* dydxProfileHeaderViewPresenter.swift */,
02F95A8D2A1D6AAD00828F9A /* dydxProfileHistoryViewPresenter.swift */,
02F6E71E2A8293270018F00C /* dydxProfileFeesViewPresenter.swift */,
27C027522AFD761300E92CCB /* dydxSettingsSecondaryActionsViewPresenter.swift */,
27C027522AFD761300E92CCB /* dydxProfileSecondaryButtonsViewPresenter.swift */,
);
path = Components;
sourceTree = "<group>";
Expand Down Expand Up @@ -2001,7 +2001,7 @@
272911D62C06A628003F3EA0 /* TransferAnalytics.swift in Sources */,
0257C78E2A00485500F6160B /* SparklineDataPoint.swift in Sources */,
028DB3402A05893D0090BE58 /* dydxProfileHeaderViewPresenter.swift in Sources */,
27C027532AFD761300E92CCB /* dydxSettingsSecondaryActionsViewPresenter.swift in Sources */,
27C027532AFD761300E92CCB /* dydxProfileSecondaryButtonsViewPresenter.swift in Sources */,
02EF485629F732C600C97746 /* dydxFavoriteStore.swift in Sources */,
0208627C28F4DAC000C9D3A0 /* dydxMarketInfoPagingViewPresenter.swift in Sources */,
0238FECB2970D681002E1C1A /* SharedAccountPresenter.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// dydxSettingsHelpRowViewPresenter.swift
// dydxProfileSecondaryButtonsViewPresenter.swift
// dydxPresenters
//
// Created by Michael Maguire on 11/9/23.
Expand All @@ -14,12 +14,12 @@ import PlatformUI
import dydxStateManager
import dydxFormatter

protocol dydxSettingsHelpRowViewPresenterProtocol: HostedViewPresenterProtocol {
var viewModel: dydxSettingsSecondaryActionsViewModel? { get }
protocol dydxProfileSecondaryButtonsViewPresenterProtocol: HostedViewPresenterProtocol {
var viewModel: dydxProfileSecondaryButtonsViewModel? { get }
}

class dydxSettingsHelpRowViewPresenter: HostedViewPresenter<dydxSettingsSecondaryActionsViewModel>, dydxSettingsHelpRowViewPresenterProtocol {
init(viewModel: dydxSettingsSecondaryActionsViewModel) {
class dydxProfileSecondaryButtonsViewPresenter: HostedViewPresenter<dydxProfileSecondaryButtonsViewModel>, dydxProfileSecondaryButtonsViewPresenterProtocol {
init(viewModel: dydxProfileSecondaryButtonsViewModel) {
super.init()

self.viewModel = viewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private protocol dydxProfileViewPresenterProtocol: HostedViewPresenterProtocol {

private class dydxProfileViewPresenter: HostedViewPresenter<dydxProfileViewModel>, dydxProfileViewPresenterProtocol {
private let buttonsPresenter: dydxProfileButtonsViewPresenter
private let settingsHelpRowPresenter: dydxSettingsHelpRowViewPresenter
private let secondaryButtonsPresenter: dydxProfileSecondaryButtonsViewPresenter
private let headerPresenter: dydxProfileHeaderViewPresenter
private let historyPresenter: dydxProfileHistoryViewPresenter
private let feesPresenter: dydxProfileFeesViewPresenter
Expand All @@ -50,7 +50,7 @@ private class dydxProfileViewPresenter: HostedViewPresenter<dydxProfileViewModel

private lazy var childPresenters: [HostedViewPresenterProtocol] = [
buttonsPresenter,
settingsHelpRowPresenter,
secondaryButtonsPresenter,
headerPresenter,
historyPresenter,
feesPresenter,
Expand All @@ -61,7 +61,7 @@ private class dydxProfileViewPresenter: HostedViewPresenter<dydxProfileViewModel
override init() {
let viewModel = dydxProfileViewModel()
headerPresenter = .init(viewModel: viewModel.header)
settingsHelpRowPresenter = .init(viewModel: viewModel.settingsHelp)
secondaryButtonsPresenter = .init(viewModel: viewModel.secondaryButtons)
buttonsPresenter = .init(viewModel: viewModel.buttons)
historyPresenter = .init()
feesPresenter = .init()
Expand Down
8 changes: 4 additions & 4 deletions dydx/dydxViews/dydxViews.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
27AAA9862ACE34C800AF3C56 /* SwiftMessages+Banner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AAA9852ACE34C800AF3C56 /* SwiftMessages+Banner.swift */; };
27AFE4EA2C1902BF00168B0B /* dydxReceiptChangeItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AFE4DD2C1902BF00168B0B /* dydxReceiptChangeItemView.swift */; };
27BAAF112BD851B500F650C3 /* dydxTakeProfitStopLossStatusViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27BAAF102BD851B500F650C3 /* dydxTakeProfitStopLossStatusViewModel.swift */; };
27C027452AFD734800E92CCB /* dydxSettingsSecondaryActionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C027442AFD734800E92CCB /* dydxSettingsSecondaryActionsView.swift */; };
27C027452AFD734800E92CCB /* dydxProfileSecondaryButtonsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C027442AFD734800E92CCB /* dydxProfileSecondaryButtonsView.swift */; };
27C6AE182C618055005517B5 /* RadioButtons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C6AE172C618055005517B5 /* RadioButtons.swift */; };
27C6E4C92BC8C30E00ED892A /* dydxCustomLimitPriceViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C6E4BC2BC8C30E00ED892A /* dydxCustomLimitPriceViewModel.swift */; };
27CDA3D42BBF1AD700FEAFFE /* dydxMultipleOrdersExistViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27CDA3D32BBF1AD700FEAFFE /* dydxMultipleOrdersExistViewModel.swift */; };
Expand Down Expand Up @@ -588,7 +588,7 @@
27AAA9852ACE34C800AF3C56 /* SwiftMessages+Banner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SwiftMessages+Banner.swift"; sourceTree = "<group>"; };
27AFE4DD2C1902BF00168B0B /* dydxReceiptChangeItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = dydxReceiptChangeItemView.swift; sourceTree = "<group>"; };
27BAAF102BD851B500F650C3 /* dydxTakeProfitStopLossStatusViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dydxTakeProfitStopLossStatusViewModel.swift; sourceTree = "<group>"; };
27C027442AFD734800E92CCB /* dydxSettingsSecondaryActionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dydxSettingsSecondaryActionsView.swift; sourceTree = "<group>"; };
27C027442AFD734800E92CCB /* dydxProfileSecondaryButtonsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dydxProfileSecondaryButtonsView.swift; sourceTree = "<group>"; };
27C6AE172C618055005517B5 /* RadioButtons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioButtons.swift; sourceTree = "<group>"; };
27C6E4BC2BC8C30E00ED892A /* dydxCustomLimitPriceViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = dydxCustomLimitPriceViewModel.swift; sourceTree = "<group>"; };
27CDA3D32BBF1AD700FEAFFE /* dydxMultipleOrdersExistViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dydxMultipleOrdersExistViewModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1146,7 +1146,7 @@
028DB33D2A0589270090BE58 /* dydxProfileHeaderView.swift */,
02F95A8B2A1D6A9200828F9A /* dydxProfileHistoryView.swift */,
02F6E7102A8292FC0018F00C /* dydxProfileFeesView.swift */,
27C027442AFD734800E92CCB /* dydxSettingsSecondaryActionsView.swift */,
27C027442AFD734800E92CCB /* dydxProfileSecondaryButtonsView.swift */,
277E8F9E2B1A847D005CCBCB /* dydxTitledCardView.swift */,
);
path = Components;
Expand Down Expand Up @@ -2078,7 +2078,7 @@
0273A1382ACCC49C001B89F5 /* dydxHistoryView.swift in Sources */,
0246DE5E28B984C700A7FF1F /* Wallets2View.swift in Sources */,
023AB3C62BEAD5E9005230B2 /* dydxTargetLeverageView.swift in Sources */,
27C027452AFD734800E92CCB /* dydxSettingsSecondaryActionsView.swift in Sources */,
27C027452AFD734800E92CCB /* dydxProfileSecondaryButtonsView.swift in Sources */,
0253155129BFA62700D6CC9B /* dydxOnboardScanInstructionsView.swift in Sources */,
27CDA3D42BBF1AD700FEAFFE /* dydxMultipleOrdersExistViewModel.swift in Sources */,
024B7B5C28B7F90100F7C386 /* dydxViewBundleClass.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// dydxSettingsHelpRowView.swift
// dydxProfileSecondaryButtonsView.swift
// dydxViews
//
// Created by Michael Maguire on 11/9/23.
Expand All @@ -9,15 +9,15 @@ import SwiftUI
import PlatformUI
import Utilities

public class dydxSettingsSecondaryActionsViewModel: PlatformViewModel {
public class dydxProfileSecondaryButtonsViewModel: PlatformViewModel {
@Published public var settingsAction: (() -> Void)?
@Published public var helpAction: (() -> Void)?
@Published public var alertsAction: (() -> Void)?

public init() { }

public static var previewValue: dydxSettingsSecondaryActionsViewModel {
let vm = dydxSettingsSecondaryActionsViewModel()
public static var previewValue: dydxProfileSecondaryButtonsViewModel {
let vm = dydxProfileSecondaryButtonsViewModel()
return vm
}

Expand All @@ -41,7 +41,7 @@ public class dydxSettingsSecondaryActionsViewModel: PlatformViewModel {
if let alertsAction {
self.createButton(imageName: "icon_alerts",
title: DataLocalizer.localize(path: "APP.GENERAL.ALERTS"),
action: self.alertsAction)
action: alertsAction)
}
}

Expand Down Expand Up @@ -84,26 +84,26 @@ public class dydxSettingsSecondaryActionsViewModel: PlatformViewModel {
}

#if DEBUG
struct dydxSettingsSecondaryActionsViewModel_Previews_Dark: PreviewProvider {
struct dydxProfileSecondaryButtonsViewModel_Previews_Dark: PreviewProvider {
@StateObject static var themeSettings = ThemeSettings.shared

static var previews: some View {
ThemeSettings.applyDarkTheme()
ThemeSettings.applyStyles()
return dydxSettingsSecondaryActionsViewModel.previewValue
return dydxProfileSecondaryButtonsViewModel.previewValue
.createView()
// .edgesIgnoringSafeArea(.bottom)
.previewLayout(.sizeThatFits)
}
}

struct dydxSettingsSecondaryActionsViewModel_Previews_Light: PreviewProvider {
struct dydxProfileSecondaryButtonsViewModel_Previews_Light: PreviewProvider {
@StateObject static var themeSettings = ThemeSettings.shared

static var previews: some View {
ThemeSettings.applyLightTheme()
ThemeSettings.applyStyles()
return dydxSettingsSecondaryActionsViewModel.previewValue
return dydxProfileSecondaryButtonsViewModel.previewValue
.createView()
// .edgesIgnoringSafeArea(.bottom)
.previewLayout(.sizeThatFits)
Expand Down
4 changes: 2 additions & 2 deletions dydx/dydxViews/dydxViews/_v4/Profile/dydxProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import dydxFormatter
public class dydxProfileViewModel: PlatformViewModel {
@Published public var header = dydxProfileHeaderViewModel()
@Published public var buttons = dydxProfileButtonsViewModel()
@Published public var secondaryActions = dydxSettingsSecondaryActionsViewModel()
@Published public var secondaryButtons = dydxProfileSecondaryButtonsViewModel()
@Published public var history: dydxProfileHistoryViewModel? = dydxProfileHistoryViewModel()
@Published public var fees: dydxProfileFeesViewModel? = dydxProfileFeesViewModel()
@Published public var balances: dydxProfileBalancesViewModel? = dydxProfileBalancesViewModel()
Expand All @@ -40,7 +40,7 @@ public class dydxProfileViewModel: PlatformViewModel {
self.buttons
.createView(parentStyle: style)

self.secondaryActions
self.secondaryButtons
.createView(parentStyle: style)
.padding(.top, 8)

Expand Down

0 comments on commit f77cf4d

Please sign in to comment.