-
Notifications
You must be signed in to change notification settings - Fork 148
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
Fix: #94,#97,#99 #95
base: main
Are you sure you want to change the base?
Fix: #94,#97,#99 #95
Conversation
…, the waveform view exceeds the screen width.
@@ -12,6 +12,9 @@ struct RecordWaveformWithButtons: View { | |||
@Environment(\.chatTheme) private var theme | |||
|
|||
@StateObject var recordPlayer = RecordingPlayer() | |||
//160 is screen left-padding/right-padding and playButton's width. | |||
//To ensure that the view does not exceed the screen, need to subtract | |||
static let viewPadding:CGFloat = 160 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how can you guarantee that this will always be 160? you should pass this value using frame getters from wherever it is set in
@@ -53,20 +56,29 @@ struct RecordWaveformWithButtons: View { | |||
} | |||
|
|||
struct RecordWaveformPlaying: View { | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please preserve the selected code style, namely:
- do not add extra spaces (
Xcode > Preferences > Text Editing > While editing > Automatically trim trailing whitespaces+Including whitespace-only lines
) - do not add extra \n like here:
var body: some View {
GeometryReader { g in
- after // there should be a space
- after // there is a small letter
// ensure that the view does not exceed the screen
- viewPadding:CGFloat - there should be a space here: "viewPadding: CGFloat"
- there should be a \n between these lines:
@StateObject var recordPlayer = RecordingPlayer()
//160 is screen left-padding/right-padding and playButton's width.
Hey @gzlboy, thank you so much, this looks great, just please fix some formatting issues and a constant. Have a great day! |
New feature: support localizable. |
hi @f3dm76 alisa, please help me check the code. I am going to use the latest code in the project. Thank you very much! |
Sorry, I don't have time for this, I am busy on a project. In any case 160 has to be removed before I can merge this. |
Understood, I try again:( |
Fix: When the recording duration is too long (for example, 2 minutes), the waveform view exceeds the screen width.
Fix:Only one audio should be played at the same time.
New feature: add copy button to message action menu
New feature: supports audio play progress dragging.
New feature: support localizable.