-
Notifications
You must be signed in to change notification settings - Fork 219
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
41 show user avatar #155
41 show user avatar #155
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"editor.tabSize": 2, | ||
"editor.formatOnSave": false, | ||
"dart.enableSdkFormatter": false, | ||
"[dart]": { | ||
"editor.formatOnSave": false, | ||
"editor.tabSize": 2, | ||
Comment on lines
+5
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These look like they're restating some of the settings that already appear globally above. Is there an additional effect that's had by restating them for the specific language? |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,12 +140,32 @@ class _LightboxPageState extends State<_LightboxPage> { | |
.add_Hms() | ||
.format(DateTime.fromMillisecondsSinceEpoch(widget.message.timestamp * 1000)); | ||
|
||
final avatarUrl = widget.message.avatarUrl == null // TODO get from user data | ||
? null // TODO handle computing gravatars | ||
: resolveUrl(widget.message.avatarUrl!, PerAccountStoreWidget.of(context).account, | ||
); | ||
|
||
final avatar = avatarUrl != null | ||
? Padding( | ||
padding: const EdgeInsets.fromLTRB(8.0,4,0,0), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like this is ending up with a very thin strip of padding between the bottom of the image and the bottom of the app bar, which comes out looking kind of odd: I think putting at least 4px of padding at the bottom too makes it look significantly better. Is there a particular reason for putting 8px at the left but 4px at the top? I think the top-left and bottom-left corners may look better if the top, left, and bottom padding are all equal. (The right is less visible because there isn't a visual boundary there.) |
||
child: Container( | ||
clipBehavior: Clip.antiAlias, | ||
width: 35, | ||
height: 35, | ||
Comment on lines
+153
to
+154
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't seem like this is actually ending up 35px tall or wide; it's bigger than that. I think what's happening is that the The size it's actually getting is fine; the sender avatars in the message list are 35px, but there's no reason these need to be the same size. We should leave out these lines given that they aren't actually having an effect. |
||
decoration: const BoxDecoration( | ||
borderRadius: BorderRadius.all(Radius.circular(4))), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
child: RealmContentNetworkImage(avatarUrl), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the other place where we show avatars, we use |
||
), | ||
) | ||
: const SizedBox.shrink(); | ||
|
||
|
||
appBar = AppBar( | ||
centerTitle: false, | ||
foregroundColor: appBarForegroundColor, | ||
backgroundColor: appBarBackgroundColor, | ||
|
||
// TODO(#41): Show message author's avatar | ||
leading: avatar, | ||
actions: const [CloseButton()], | ||
title: RichText( | ||
text: TextSpan(children: [ | ||
TextSpan( | ||
|
@@ -205,7 +225,7 @@ class _LightboxPageState extends State<_LightboxPage> { | |
Route getLightboxRoute({ | ||
required BuildContext context, | ||
required Message message, | ||
required String src | ||
required String src, | ||
}) { | ||
return AccountPageRouteBuilder( | ||
context: context, | ||
|
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.
Ah, I just spotted that your new revision added this line. Did this turn out to be the solution to this problem you mentioned above?
If so, that's good to hear!