-
Notifications
You must be signed in to change notification settings - Fork 5
Profile Edit #48
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
Merged
Merged
Profile Edit #48
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
6d46d0e
Update user avatar design in profile
Xialtal 693d031
Add mock for user devices
Xialtal 5af7f72
Profile last seen date improvements
Xialtal f591f15
Add user avatar update endpoint
Xialtal d6b5ba0
Add user device update endpoint
Xialtal da449cc
Fix localization for user gender in profile
Xialtal eaf1c72
Make some user model fields mutable
Xialtal 0715100
Add user birthday as Date field to user model
Xialtal 5b836b0
Merge remote-tracking branch 'origin/develop' into feature/edit-profile
Xialtal 1a19da9
Add edit profile endpoint
Xialtal 3c9dd4a
Fix user votes section in reputation
Xialtal 535390e
Merge branch 'develop' into feature/edit-profile
Xialtal 2d72105
Post-merge fix
Xialtal d8f4fcd
Add profile edit support
Xialtal 0e37850
Add to user profile edit button auth check
Xialtal bf53a5e
Gender picker improvements in profile edit
Xialtal fffd63a
Quickfix for Field borders on IOS 26
Xialtal 4f46fb1
Profile edit improvements
Xialtal 9f6cad3
Fix dependencies for profile feature
Xialtal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
Modules/Sources/APIClient/Requests/UserProfileEditRequest.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| // | ||
| // UserProfileEditRequest.swift | ||
| // ForPDA | ||
| // | ||
| // Created by Xialtal on 2.09.25. | ||
| // | ||
|
|
||
| import Foundation | ||
| import Models | ||
| import PDAPI | ||
|
|
||
| public struct UserProfileEditRequest: Sendable { | ||
| public let userId: Int | ||
| public let city: String | ||
| public let about: String | ||
| public let gender: User.Gender | ||
| public let status: String | ||
| public let signature: String | ||
| public let birthdayDate: Date? | ||
|
|
||
| public init( | ||
| userId: Int, | ||
| city: String, | ||
| about: String, | ||
| gender: User.Gender, | ||
| status: String, | ||
| signature: String, | ||
| birthdayDate: Date? | ||
| ) { | ||
| self.userId = userId | ||
| self.city = city | ||
| self.about = about | ||
| self.gender = gender | ||
| self.status = status | ||
| self.signature = signature | ||
| self.birthdayDate = birthdayDate | ||
| } | ||
| } | ||
|
|
||
| extension UserProfileEditRequest { | ||
| var transferGender: MemberProfileRequest.Gender { | ||
| switch gender { | ||
| case .male: return .male | ||
| case .female: return .female | ||
| case .unknown: return .unknown | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Modules/Sources/Models/Profile/UserAvatarResponseType.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // | ||
| // UserAvatarResponseType.swift | ||
| // ForPDA | ||
| // | ||
| // Created by Xialtal on 29.08.25. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| public enum UserAvatarResponseType: Sendable { | ||
| case error | ||
| case success(URL?) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // | ||
| // UserDeviceAction.swift | ||
| // ForPDA | ||
| // | ||
| // Created by Xialtal on 29.08.25. | ||
| // | ||
|
|
||
| public enum UserDeviceAction: Sendable { | ||
| case add | ||
| case modify | ||
| case remove | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.