-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fancy Posts #39
base: main
Are you sure you want to change the base?
Fancy Posts #39
Conversation
fd55b33
to
7fb27ba
Compare
@MattsAttack, you pushed a rebase instead of force pushing, so I had to clean it up. |
My bad |
Oh, and I did it wrong myself. Give me a few minutes. |
7fb27ba
to
4c36abe
Compare
Ok, you can run |
@lishaduck I believe there's an issue with the app not requesting the users location and then not loading in the local feed. The pop up to request location only pops up sometimes on web and if doesn't theres no way to load in the local feed |
Might be fixed with #44? |
|
||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
return AutoTabsScaffold( |
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.
Can we use AutoTabsRouter.tabBar (and no scaffold?)
post.timestamp.timeZoneOffset; // Duration values are negative | ||
int timeValue; | ||
String timePostValue; | ||
if (timeSincePost.inDays < -364) { |
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.
When is it less than a negative? This is a bit confusing. Also, you ought to be able to use a switch here, which is nice. You can't usually do that.
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 changed how this worked. Its a positive difference now
@lishaduck how should I go about getting a username from a user id? |
For security reasons you, erm, can't. I spent a lot of time looking into it, and it looks like you'd need to a) write a server function, or b) store a user-id => preferred name mapping in a new db collection, which would be annoying. |
What if I just added an attribute to posts that stores the person who created its user name? That should be pretty simple. |
Hm. That'd be fine assuming that we don't allow changing your display name. |
That's true. But if they were to change it we could update the value of the posts the users made in the data base with their new user name. It's not the best but its probably better than sending an api call every time you load a post |
It would take a while and we could cache it, but yeah, I think it'd be fine. Just write it :) |
Ai ai captain |
Future<MemoryImage> getAvatar(Avatars avatarService) async { | ||
return MemoryImage(await avatarService.getInitials(name: post.authorName)); | ||
} |
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.
This fetches them every frame. (well, flutter and images are weird, it might just be per every time it gets a new render, but still, should be globally memoized)
I forgot to share this with you: https://github.com/PSDTools/app/blob/2b793de1d796cb215a91a2b1767d95fbb80481cc/lib/features/auth/data/avatar_repository.dart
https://github.com/PSDTools/app/blob/2b793de1d796cb215a91a2b1767d95fbb80481cc/lib/features/auth/data/auth_repository.dart
I've been wanting to add a drawer, I might just copy all this code over.
Oh nice! Did you fix the local world tab background? |
Yup! It was easy-peasy once I'd figured out the issue. |
awesome sauce |
@lishaduck could you help me debug the windows build sometime? The rebrand broke it due to naming issues. It's currently crashing and returning: CMake Error at CMakeLists.txt:41 (target_compile_features): CMake Error at runner/CMakeLists.txt:24 (target_compile_definitions): CMake Error at runner/CMakeLists.txt:25 (target_compile_definitions): CMake Error at runner/CMakeLists.txt:26 (target_compile_definitions): CMake Error at runner/CMakeLists.txt:27 (target_compile_definitions): CMake Error at runner/CMakeLists.txt:28 (target_compile_definitions): CMake Error at runner/CMakeLists.txt:31 (target_compile_definitions): CMake Error at runner/CMakeLists.txt:35 (target_link_libraries): Error: Unable to generate build files Exited (1). I figured out that one of the issues is your binary name has spaced but not it's giving this error 20 times:
No target "nexus" I'm assuming it's because the name of the app in pubspec is different. We may want to decide on a name for the TSA version and just rename everything. I've committed what I've done so far. |
"github-actions.workflows.pinned.workflows": [ | ||
".github/workflows/ci.yaml" | ||
], | ||
"C_Cpp.errorSquiggles": "enabled" |
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.
What's this?
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 accidentally disabled errorSquiggles so i turned them back on. I thought it was a local setting
@@ -6,7 +6,7 @@ project(runner LANGUAGES CXX) | |||
# work. | |||
# | |||
# Any new source files that you add to the application should be added here. | |||
add_executable(${BINARY_NAME} WIN32 | |||
add_executable(TownTalk WIN32 |
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.
Was this intentional?
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.
Loosely. I wanted to see if it would change anything. I'll probably revert it
Co-authored-by: Eli <[email protected]> Signed-off-by: Matthew Wasser <[email protected]>
Co-authored-by: Eli <[email protected]> Signed-off-by: Matthew Wasser <[email protected]>
Co-authored-by: Eli <[email protected]> Signed-off-by: Matthew Wasser <[email protected]>
@lishaduck yeah it's still returning
No target "nexus" 20 times |
Try |
onPressed: () { | ||
if (thumbsIcon.value.icon == Icons.thumb_up_outlined) { | ||
thumbsIcon.value = const Icon(Icons.thumb_up_sharp); | ||
} else { | ||
thumbsIcon.value = const Icon(Icons.thumb_up_outlined); | ||
} | ||
}, |
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.
Is this meant as an animation? 🤣
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.
maybe eventually. right now it just updates the icon of the thumb when you click it
if (cachedPost != null) return cachedPost; | ||
|
||
if (cachedPost != null) { | ||
// Updates |
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.
Amazing comment. -1
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.
Whoops. I was to busy watching Freebird
Description
This PR...
Closes: #issue
CC: @MattsAttack
Type of Change
Checklist
Tested on