-
Notifications
You must be signed in to change notification settings - Fork 155
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
Take pictures with camera #1043
Conversation
NIce PR! |
val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US).format(Date()) | ||
val storageDir: File? = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES) | ||
File | ||
.createTempFile( |
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.
Hmm, I wonder if it's a good idea to do this here, since it will run on the UI thread. Please have you observed any performance issues?
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.
I didn't test the performance yet. I had to stop working on this to fix a few bugs in amber and citrine.
I'll start working on this again tomorrow
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.
I didn't test the performance yet. I had to stop working on this to fix a few bugs in amber and citrine. I'll start working on this again tomorrow
Got it. 👍
Should I use different buttons for camera and gallery or show a dialog? |
Hum... I think it depends on the screen. On the new post, a new button is better. On chat, a popup is better. I am not sure what to do on the stories/media feed though.. |
makes sense. We have some of that in the chat (creates public and private
buttons)
…On Fri, Sep 6, 2024 at 8:02 AM greenart7c3 ***@***.***> wrote:
I think we can do an animated button like this in the stories feed
image.png (view on web)
<https://github.com/user-attachments/assets/2dadc573-9035-4666-97de-33f0ff3b0205>
—
Reply to this email directly, view it on GitHub
<#1043 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEB4P2CHQHKKISDSZEDPLDZVGKW5AVCNFSM6AAAAABNQIHJMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTHEYDGNRTHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Vitor [Veetor] Pamplona
Lead | Amethyst <https://amethyst.social/>
Founder | EyeNetra <http://eyenetra.com> Inc
CTO | PathCheck <http://pathcheck.org> Foundation
President | SciBr <http://scibr.org> Foundation
Mobile: +1 617 318 8685 | ***@***.***
This email message is confidential. Any review, dissemination, distribution
or copying of this message is strictly prohibited.
|
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.
Nice changes made!
amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/NewPostView.kt
Show resolved
Hide resolved
) | ||
|
||
if (cameraPermissionState.status.isGranted) { | ||
LaunchedEffect(key1 = accountViewModel) { |
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.
accountViewModel as key, interesting. Please, did you have better reliability using it?
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.
I just copied from the other button
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.
FYI, I am moving most of the Singleton classes (LocalCache, etc) to be variables inside the AccountViewModel. This will make it massive in the short term, but once everything is in one spot with lifecycle support, we can start to move some of these actions to helper classes. We should then be able to build dynamic flows based on the LocalCache's state.
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.
I just copied from the other button
Got it. 👍
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.
FYI, I am moving most of the Singleton classes (LocalCache, etc) to be variables inside the AccountViewModel. This will make it massive in the short term, but once everything is in one spot with lifecycle support, we can start to move some of these actions to helper classes. We should then be able to build dynamic flows based on the LocalCache's state.
I guess @greenart7c3 could to do a follow-up PR once the migration is done(unless you do it in the meantime :)).
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.
Nice!
Super nice! Is this ready to merge? |
Yes, you can merge this. Unless you want videos too, for videos I think there's no intent for videos and we need to build a camera ui inside the app |
Yeah, I hate how Android doesn't provide a simple feed from the phone's main camera app. |
No description provided.