Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOB-1858 - Load followers on explore feature #420

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
be213e9
Created HomeExploreView
Oleg-Pecheneg Feb 23, 2024
1ff440c
Increased tappable area of chat nav title profile selector
Oleg-Pecheneg Feb 23, 2024
eeff3bd
Created explore view model.
Oleg-Pecheneg Feb 23, 2024
7615517
Added explore view to tab bar
Oleg-Pecheneg Feb 23, 2024
3f323be
Prepare mock data
Oleg-Pecheneg Feb 23, 2024
031864e
Implemented UI for followers section
Oleg-Pecheneg Feb 23, 2024
f07f1f2
Added expandable followers/followings sections
Oleg-Pecheneg Feb 23, 2024
4eb07b8
Added separators
Oleg-Pecheneg Feb 23, 2024
a79a132
Moved search functionality to explore section
Oleg-Pecheneg Feb 23, 2024
e1de387
Set explore title visibility
Oleg-Pecheneg Feb 23, 2024
7a2ffbe
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1837-explo…
Oleg-Pecheneg Feb 27, 2024
5abd9be
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1837-explo…
Oleg-Pecheneg Feb 29, 2024
5560cd4
Created UDSegmentedControlView
Oleg-Pecheneg Feb 29, 2024
32c5b8f
Updated segmented control UI
Oleg-Pecheneg Feb 29, 2024
0c47bd0
Added section with trending profiles
Oleg-Pecheneg Feb 29, 2024
ef4d102
Fixed preview target
Oleg-Pecheneg Feb 29, 2024
81ef4de
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1837-explo…
Oleg-Pecheneg Mar 1, 2024
3ea63aa
Implemented UI for followers picker
Oleg-Pecheneg Mar 1, 2024
eb830da
Refactoring.
Oleg-Pecheneg Mar 1, 2024
a0ce2f4
View refactoring
Oleg-Pecheneg Mar 1, 2024
3615c27
Implemented recent section header view
Oleg-Pecheneg Mar 1, 2024
df1bf73
Working on user domains search result
Oleg-Pecheneg Mar 1, 2024
149a00d
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1837-explo…
Oleg-Pecheneg Mar 4, 2024
cb7c944
Updated imge bridge view
Oleg-Pecheneg Mar 4, 2024
385c5f8
Handle domain selection
Oleg-Pecheneg Mar 4, 2024
7419364
Added empty state to search result.
Oleg-Pecheneg Mar 4, 2024
54603fa
Use adjusted key to search for user's domains
Oleg-Pecheneg Mar 4, 2024
b60beae
Public domain view refactoring
Oleg-Pecheneg Mar 4, 2024
44970a3
Rename crypto to addresses
Oleg-Pecheneg Mar 4, 2024
4e759c8
Extraced token ui description from home module
Oleg-Pecheneg Mar 4, 2024
c0b5e8a
Show list of tokens on public profile
Oleg-Pecheneg Mar 4, 2024
1d34707
MOB-1857 - Removed old search domains entry
Oleg-Pecheneg Mar 4, 2024
d066136
Updated UDCollectionListRowButton usage
Oleg-Pecheneg Mar 4, 2024
e5184d7
Created entities and service for public profile
Oleg-Pecheneg Mar 4, 2024
706f490
Created core data storage for public domain profiles
Oleg-Pecheneg Mar 4, 2024
9d7d1b4
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1837-explo…
Oleg-Pecheneg Mar 4, 2024
936b405
Merge branch 'dev/feat/MOB-1837-explore-ui' into dev/feat/MOB-1856-pu…
Oleg-Pecheneg Mar 4, 2024
c798832
Merge branch 'dev/feat/MOB-1856-public-tokens' into dev/feat/MOB-1857…
Oleg-Pecheneg Mar 4, 2024
481bd49
Merge branch 'dev/feat/MOB-1857-remove-old-search' into dev/feat/MOB-…
Oleg-Pecheneg Mar 4, 2024
eff2de9
Adjust UI on explore screen
Oleg-Pecheneg Mar 4, 2024
d5f95ee
Extended public profile
Oleg-Pecheneg Mar 5, 2024
e325eac
Use public domain profile instead of serialized model.
Oleg-Pecheneg Mar 5, 2024
b75b4a4
Isolate domain profile service dependencies
Oleg-Pecheneg Mar 5, 2024
6d7b0a3
Moved follow/unfollow functions to profile service
Oleg-Pecheneg Mar 5, 2024
5e8455e
Refactoring
Oleg-Pecheneg Mar 5, 2024
98d1a3c
Load and publish socials info
Oleg-Pecheneg Mar 5, 2024
95c0c94
Updated followers fetching and display
Oleg-Pecheneg Mar 5, 2024
073bed7
Refactoring
Oleg-Pecheneg Mar 5, 2024
88ad4c5
Added DomainProfileSocialRelationshipDetails tests
Oleg-Pecheneg Mar 5, 2024
d43ded5
Adding DomainProfilesServiceTests
Oleg-Pecheneg Mar 5, 2024
a94106d
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1856-publi…
Oleg-Pecheneg Mar 5, 2024
fe2b74f
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1856-publi…
Oleg-Pecheneg Mar 5, 2024
63c21a0
Merge branch 'dev/feat/MOB-1856-public-tokens' into dev/feat/MOB-1857…
Oleg-Pecheneg Mar 5, 2024
cd65168
Merge branch 'dev/feat/MOB-1857-remove-old-search' into dev/feat/MOB-…
Oleg-Pecheneg Mar 5, 2024
91e371a
Handle profile selection
Oleg-Pecheneg Mar 5, 2024
96b040c
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1856-publi…
Oleg-Pecheneg Mar 5, 2024
1bc589d
Merge branch 'dev/feat/MOB-1856-public-tokens' into dev/feat/MOB-1857…
Oleg-Pecheneg Mar 5, 2024
cbb2b51
Merge branch 'dev/feat/MOB-1857-remove-old-search' into dev/feat/MOB-…
Oleg-Pecheneg Mar 5, 2024
49bb0c0
Load user's profile
Oleg-Pecheneg Mar 5, 2024
72b3a11
Fixed long names in follower tile
Oleg-Pecheneg Mar 5, 2024
f45dc65
Improved concurrency safety of load followers info
Oleg-Pecheneg Mar 6, 2024
7a71336
Refactoring
Oleg-Pecheneg Mar 6, 2024
b590303
Track profile state when user follow/unfollow/update profile
Oleg-Pecheneg Mar 6, 2024
c878181
Fixed loading of profile info in follower tile.
Oleg-Pecheneg Mar 6, 2024
1e58a2e
Test follow and unfollow functions
Oleg-Pecheneg Mar 6, 2024
24593df
Call load more followers on scroll
Oleg-Pecheneg Mar 6, 2024
ad79c9c
Extended tests to initial data loaded
Oleg-Pecheneg Mar 6, 2024
2c5265f
Added testLoadMoreCalledOnPublishedRequestOnce
Oleg-Pecheneg Mar 6, 2024
fe0c487
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1857-remov…
Oleg-Pecheneg Mar 6, 2024
4bfe47d
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1857-remov…
Oleg-Pecheneg Mar 6, 2024
1949ac7
Merge branch 'dev/feat/MOB-1857-remove-old-search' into dev/feat/MOB-…
Oleg-Pecheneg Mar 6, 2024
00fa728
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1858-load-…
Oleg-Pecheneg Mar 6, 2024
1ffd6fb
Merge branch 'dev/feat/MOB-1836-explore' into dev/feat/MOB-1858-load-…
Oleg-Pecheneg Mar 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prepare mock data
  • Loading branch information
Oleg-Pecheneg committed Feb 23, 2024
commit 3f323be9f4d2beac340102ccc15b78e00c426ce5
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,13 @@
C6203A4F2B882959000A1A8E /* HomeExploreView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6203A4D2B882959000A1A8E /* HomeExploreView.swift */; };
C6203A512B882EBC000A1A8E /* HomeExploreViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6203A502B882EBC000A1A8E /* HomeExploreViewModel.swift */; };
C6203A522B882EBC000A1A8E /* HomeExploreViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6203A502B882EBC000A1A8E /* HomeExploreViewModel.swift */; };
C6203A542B88356E000A1A8E /* HomeExploreNavigationDestination.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6203A532B88356E000A1A8E /* HomeExploreNavigationDestination.swift */; };
C6203A552B88356E000A1A8E /* HomeExploreNavigationDestination.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6203A532B88356E000A1A8E /* HomeExploreNavigationDestination.swift */; };
C6203A572B883832000A1A8E /* MockEntitiesFabric.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6F946DA2A6788E0008043AC /* MockEntitiesFabric.swift */; };
C6203A592B883847000A1A8E /* MockEntitiesFabric+Messaging.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6203A582B883847000A1A8E /* MockEntitiesFabric+Messaging.swift */; };
C6203A5A2B883847000A1A8E /* MockEntitiesFabric+Messaging.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6203A582B883847000A1A8E /* MockEntitiesFabric+Messaging.swift */; };
C6203A5C2B88387B000A1A8E /* MockEntitiesFabric+Domains.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6203A5B2B88387B000A1A8E /* MockEntitiesFabric+Domains.swift */; };
C6203A5D2B88387B000A1A8E /* MockEntitiesFabric+Domains.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6203A5B2B88387B000A1A8E /* MockEntitiesFabric+Domains.swift */; };
C6209F9929D41B9700D573EB /* LocalNotificationsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6209F9729D4180500D573EB /* LocalNotificationsService.swift */; };
C62247A0283B8903002A0CBD /* CollectionReusableRoundedBackgroundWhiteWithAlpha.swift in Sources */ = {isa = PBXBuildFile; fileRef = C622479F283B8903002A0CBD /* CollectionReusableRoundedBackgroundWhiteWithAlpha.swift */; };
C62247A5283B92C0002A0CBD /* UDNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C62247A4283B92C0002A0CBD /* UDNavigationController.swift */; };
Expand Down Expand Up @@ -2672,6 +2679,9 @@
C61FD05528FD3F540088CFDD /* ShareDomainHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareDomainHandler.swift; sourceTree = "<group>"; };
C6203A4D2B882959000A1A8E /* HomeExploreView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeExploreView.swift; sourceTree = "<group>"; };
C6203A502B882EBC000A1A8E /* HomeExploreViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeExploreViewModel.swift; sourceTree = "<group>"; };
C6203A532B88356E000A1A8E /* HomeExploreNavigationDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeExploreNavigationDestination.swift; sourceTree = "<group>"; };
C6203A582B883847000A1A8E /* MockEntitiesFabric+Messaging.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MockEntitiesFabric+Messaging.swift"; sourceTree = "<group>"; };
C6203A5B2B88387B000A1A8E /* MockEntitiesFabric+Domains.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MockEntitiesFabric+Domains.swift"; sourceTree = "<group>"; };
C6209F9729D4180500D573EB /* LocalNotificationsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalNotificationsService.swift; sourceTree = "<group>"; };
C622479F283B8903002A0CBD /* CollectionReusableRoundedBackgroundWhiteWithAlpha.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionReusableRoundedBackgroundWhiteWithAlpha.swift; sourceTree = "<group>"; };
C62247A4283B92C0002A0CBD /* UDNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UDNavigationController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4480,6 +4490,9 @@
C6109E4328E5ABFE0027D5D8 /* Mock */ = {
isa = PBXGroup;
children = (
C6F946DA2A6788E0008043AC /* MockEntitiesFabric.swift */,
C6203A582B883847000A1A8E /* MockEntitiesFabric+Messaging.swift */,
C6203A5B2B88387B000A1A8E /* MockEntitiesFabric+Domains.swift */,
C6109E4428E5ABFE0027D5D8 /* TestsEnum.swift */,
);
path = Mock;
Expand Down Expand Up @@ -4795,6 +4808,7 @@
children = (
C6203A502B882EBC000A1A8E /* HomeExploreViewModel.swift */,
C6203A4D2B882959000A1A8E /* HomeExploreView.swift */,
C6203A532B88356E000A1A8E /* HomeExploreNavigationDestination.swift */,
);
path = Explore;
sourceTree = "<group>";
Expand Down Expand Up @@ -6856,7 +6870,6 @@
C60C298B2834E30000626851 /* GroupedCoinRecord.swift */,
C63414D92A7D335100C80B77 /* GlobalRR.swift */,
30BA2B35252914100097817E /* Helpers.swift */,
C6F946DA2A6788E0008043AC /* MockEntitiesFabric.swift */,
C6B65F962B566B37006D1812 /* NFTDisplayInfo.swift */,
C6ED320C295E8EDE00BC6919 /* NonEmptyArray.swift */,
C671E3AB28FEE72B00A2B3A0 /* UnstoppableImagePicker.swift */,
Expand Down Expand Up @@ -8619,6 +8632,7 @@
C669B4552B748214001D4788 /* HomeView.swift in Sources */,
C663D1AE2AFCA022003C54E0 /* DomainProfileLinkValidator.swift in Sources */,
C6A474D029D150A40073415F /* NoParkedDomainsFoundViewPresenter.swift in Sources */,
C6203A542B88356E000A1A8E /* HomeExploreNavigationDestination.swift in Sources */,
C669C39E291280C900837F21 /* DomainProfileBadgesSection.swift in Sources */,
C624D76B281AD2B900F55530 /* FABButton.swift in Sources */,
C63095E82B0DA66400205054 /* UDFirebaseSigner.swift in Sources */,
Expand Down Expand Up @@ -8810,6 +8824,7 @@
C6F9FBDE2A25C5AF00102F81 /* PushMessagingChannelsWebSocketsService.swift in Sources */,
C6F6AF6E28A4D4BA00A7B571 /* BlurVisibilityAfterLimitNavBarScrollingBehaviour.swift in Sources */,
C6568EF92B204E4C0022B598 /* UIImageBridgeView.swift in Sources */,
C6203A592B883847000A1A8E /* MockEntitiesFabric+Messaging.swift in Sources */,
C6FE49DB285CBAB10058F9D1 /* CoreAppCoordinatorProtocol.swift in Sources */,
C63538F02949D55D00ECABA6 /* DomainWithDisplayInfo.swift in Sources */,
C630E4A32B7F48D4008F3269 /* AlwaysPopoverModifier.swift in Sources */,
Expand Down Expand Up @@ -9106,6 +9121,7 @@
C692C313282E303B00C31393 /* NetworkReachabilityService.swift in Sources */,
C655D029284630AC00E80A65 /* MockDataAggregatorService.swift in Sources */,
C6170EC42B7A0075008E9C93 /* ShowingWalletSelectionModifier.swift in Sources */,
C6203A5C2B88387B000A1A8E /* MockEntitiesFabric+Domains.swift in Sources */,
C628E35427FDB8560044E408 /* DashesProgressView.swift in Sources */,
C635193828D03F8F00FC6AF8 /* ChooseReverseResolutionDomainViewPresenter.swift in Sources */,
C61807CA2B19A3B00032E543 /* PullUpViewServiceProtocol.swift in Sources */,
Expand Down Expand Up @@ -9235,6 +9251,7 @@
C6109E8B28E5B18B0027D5D8 /* TestsEnum.swift in Sources */,
C6109E7A28E5AC510027D5D8 /* HappyEndRobot.swift in Sources */,
C6109E7E28E5AC510027D5D8 /* RecoveryPhraseRobot.swift in Sources */,
C6203A572B883832000A1A8E /* MockEntitiesFabric.swift in Sources */,
C6109E7728E5AC510027D5D8 /* ConfirmRecoveryWordsRobot.swift in Sources */,
C6109E7828E5AC510027D5D8 /* WalletDetailsRobot.swift in Sources */,
C6109E7628E5AC510027D5D8 /* DomainsCollectionScreenRobot.swift in Sources */,
Expand Down Expand Up @@ -9854,6 +9871,7 @@
C6D647082B1ED7CA00D724AC /* MessagingNewsChannel.swift in Sources */,
C6D646AB2B1ED16900D724AC /* DomainProfileTutorialItemPrivacyViewController.swift in Sources */,
C618081A2B19AAEF0032E543 /* FirebaseDomainsServiceProtocol.swift in Sources */,
C6203A5A2B883847000A1A8E /* MockEntitiesFabric+Messaging.swift in Sources */,
C6D646D32B1ED2C800D724AC /* UDTextField.swift in Sources */,
C61808742B19BC150032E543 /* Font.swift in Sources */,
C618086F2B19BC100032E543 /* View+Skeleton.swift in Sources */,
Expand Down Expand Up @@ -10079,12 +10097,14 @@
C6C8F9532B21858200A9834D /* PreviewValet.swift in Sources */,
C6C8F9252B2183B700A9834D /* PasscodeInputView.swift in Sources */,
C6D646D62B1ED2E700D724AC /* DomainProfileSocialsVerificationPresenter.swift in Sources */,
C6203A5D2B88387B000A1A8E /* MockEntitiesFabric+Domains.swift in Sources */,
C6D646C62B1ED24E00D724AC /* SocialsType.swift in Sources */,
C669B4532B747607001D4788 /* SettingsLinkNavigationDestination.swift in Sources */,
C6B65FAE2B57A5BB006D1812 /* DismissIndicatorView.swift in Sources */,
C6D646AA2B1ED15F00D724AC /* DomainProfileViewPresenter.swift in Sources */,
C6D646592B1ED10D00D724AC /* DomainProfileMetadataCell.swift in Sources */,
C61807B22B199DD70032E543 /* UIView.swift in Sources */,
C6203A552B88356E000A1A8E /* HomeExploreNavigationDestination.swift in Sources */,
C61807E32B19A57D0032E543 /* DomainsSortOrderStorage.swift in Sources */,
C6D645B22B1DBBCE00D724AC /* PreviewConnectedAppsImageCache.swift in Sources */,
C6A89C5F2B31654E008AB043 /* HotFeatureSuggestionsService.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
//
// MockEntitiesFabric+Domains.swift
// domains-manager-ios
//
// Created by Oleg Kuplin on 23.02.2024.
//

import UIKit

// MARK: - Domains
extension MockEntitiesFabric {
enum Domains {
static func mockDomainDisplayInfo(ownerWallet: String) -> [DomainDisplayInfo] {
var domains = [DomainDisplayInfo]()
let tlds: [String] = ["x", "nft", "unstoppable"]

for tld in tlds {
for i in 0..<5 {
let domain = DomainDisplayInfo(name: "oleg_\(i)_\(ownerWallet.last!).\(tld)",
ownerWallet: ownerWallet,
blockchain: .Matic,
isSetForRR: false)
domains.append(domain)
}

for i in 0..<5 {
let domain = DomainDisplayInfo(name: "subdomain_\(i).oleg_0.\(tld)",
ownerWallet: ownerWallet,
blockchain: .Matic,
isSetForRR: false)
domains.append(domain)
}
}

return domains
}

static func mockFirebaseDomains() -> [FirebaseDomain] {
[
/// Parking purchased
.init(claimStatus: "",
internalCustody: true,
purchasedAt: Date(),
parkingExpiresAt: Date().adding(days: 40),
parkingTrial: false,
domainId: 0,
blockchain: "MATIC",
name: "parked.x",
ownerAddress: "123"),
/// Parking expires soon
.init(claimStatus: "",
internalCustody: true,
purchasedAt: Date(),
parkingExpiresAt: Date().adding(days: 10),
parkingTrial: false,
domainId: 0,
blockchain: "MATIC",
name: "parking_exp_soon.x",
ownerAddress: "123"),
///Parking trial
.init(claimStatus: "",
internalCustody: true,
purchasedAt: Date(),
parkingExpiresAt: Date().addingTimeInterval(60 * 60 * 24),
parkingTrial: true,
domainId: 0,
blockchain: "MATIC",
name: "on_trial.x",
ownerAddress: "123"),
///Parking expired
.init(claimStatus: "",
internalCustody: true,
purchasedAt: Date(),
parkingExpiresAt: Date().addingTimeInterval(-60 * 60 * 24),
parkingTrial: false,
domainId: 0,
blockchain: "MATIC",
name: "expired.x",
ownerAddress: "123"),
///Free parking
.init(claimStatus: "",
internalCustody: true,
purchasedAt: Date(),
parkingExpiresAt: nil,
parkingTrial: false,
domainId: 0,
blockchain: "MATIC",
name: "free.x",
ownerAddress: "123")
]
}

static func createPublicProfile(attributes: PublicDomainProfileAttributes = DomainProfile.createEmptyPublicProfileAttributes()) -> SerializedPublicDomainProfile {
.init(profile: attributes,
socialAccounts: nil,
referralCode: nil,
social: nil,
records: nil,
walletBalances: nil)
}
}
}

// MARK: - Domains profiles
extension MockEntitiesFabric {
enum DomainProfile {
static func createEmptyPublicProfileAttributes() -> PublicDomainProfileAttributes {
PublicDomainProfileAttributes(displayName: nil,
description: nil,
location: nil,
web2Url: nil,
imagePath: nil,
imageType: nil,
coverPath: nil,
phoneNumber: nil,
domainPurchased: nil,
udBlue: false)
}

static func createPublicProfileAttributes(displayName: String = "Oleg Kuplin",
imagePath: String? = nil,
coverPath: String? = nil) -> PublicDomainProfileAttributes {
PublicDomainProfileAttributes(displayName: displayName,
description: "Unstoppable iOS developer",
location: "Danang",
web2Url: "ud.me/oleg.x",
imagePath: imagePath,
imageType: .onChain,
coverPath: coverPath,
phoneNumber: nil,
domainPurchased: nil,
udBlue: false)
}

static func createSocialAccounts() -> SocialAccounts {
.init(twitter: createSerializedDomainSocialAccount(value: "lastsummer"),
discord: createSerializedDomainSocialAccount(),
youtube: createSerializedDomainSocialAccount(value: "https://www.youtube.com/channel/UCH7R3uNh4yqL0FmBLHXHLDg"),
reddit: createSerializedDomainSocialAccount(value:"TopTrending2022"),
telegram: createSerializedDomainSocialAccount(value: "lastsummersix"))
}

static func createSerializedDomainSocialAccount(value: String = "") -> SerializedDomainSocialAccount {
.init(location: value, verified: true, public: true)
}

static func createDomainProfileSocialInfo(followingCount: Int = 0,
followerCount: Int = 0) -> DomainProfileSocialInfo {
.init(followingCount: followingCount,
followerCount: followerCount)
}

static func createPublicProfileRecords() -> [String : String] {
["ETH" : "0xaldfjsflsjdflksdjflsdkjflsdkfjsldfkj"]
}

static func createFollowersListFor(domain: String,
followerNames: [String],
relationshipType: DomainProfileFollowerRelationshipType) -> DomainProfileFollowersResponse {
DomainProfileFollowersResponse(domain: domain,
data: followerNames.map { .init(domain: $0) },
relationshipType: relationshipType,
meta: .init(totalCount: followerNames.count,
pagination: .init(cursor: nil, take: followerNames.count)))
}
}
}

// MARK: - Explore
extension MockEntitiesFabric {
enum Explore {
static func createFollowersProfiles() -> [SerializedPublicDomainProfile] {
[Domains.createPublicProfile(), // Empty
Domains.createPublicProfile(attributes: DomainProfile.createPublicProfileAttributes(imagePath: ImageURLs.aiAvatar.rawValue)), // Avatar
Domains.createPublicProfile(attributes: DomainProfile.createPublicProfileAttributes(coverPath: ImageURLs.sunset.rawValue)), // Cover path
Domains.createPublicProfile(attributes: DomainProfile.createPublicProfileAttributes(imagePath: ImageURLs.aiAvatar.rawValue, coverPath: ImageURLs.sunset.rawValue))] // Avatar and cover 1
}
}
}
Loading