Skip to content

Commit

Permalink
Merge pull request #360 from kevinaboos/misc_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinaboos authored Jan 29, 2025
2 parents 5a4c14f + 002b2fd commit b5bed86
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 36 deletions.
52 changes: 26 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/home/loading_pane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ live_design! {

main_content = <RoundedView> {
flow: Down
width: 600
width: 400
height: Fit
padding: {top: 25, right: 30 bottom: 30 left: 45}
spacing: 10
Expand Down
14 changes: 12 additions & 2 deletions src/home/room_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1797,6 +1797,10 @@ impl RoomScreen {
if self.room_id.as_ref() == Some(room_id) {
return true;
}
if let Err(e) = robius_open::Uri::new(&url).open() {
error!("Failed to open URL {:?}. Error: {:?}", url, e);
enqueue_popup_notification("Could not open URL: {url}".to_string());
}
if let Some(_known_room) = get_client().and_then(|c| c.get_room(room_id)) {
log!("TODO: jump to known room {}", room_id);
} else {
Expand All @@ -1805,6 +1809,10 @@ impl RoomScreen {
true
}
MatrixId::RoomAlias(room_alias) => {
if let Err(e) = robius_open::Uri::new(&url).open() {
error!("Failed to open URL {:?}. Error: {:?}", url, e);
enqueue_popup_notification("Could not open URL: {url}".to_string());
}
log!("TODO: open room alias {}", room_alias);
// TODO: open a room loading screen that shows a spinner
// while our background async task calls Client::resolve_room_alias()
Expand All @@ -1813,8 +1821,6 @@ impl RoomScreen {
true
}
MatrixId::User(user_id) => {
log!("Opening matrix.to user link for {}", user_id);

// There is no synchronous way to get the user's full profile info
// including the details of their room membership,
// so we fill in with the details we *do* know currently,
Expand All @@ -1841,6 +1847,10 @@ impl RoomScreen {
true
}
MatrixId::Event(room_id, event_id) => {
if let Err(e) = robius_open::Uri::new(&url).open() {
error!("Failed to open URL {:?}. Error: {:?}", url, e);
enqueue_popup_notification("Could not open URL: {url}".to_string());
}
log!("TODO: open event {} in room {}", event_id, room_id);
// TODO: this requires the same first step as the `MatrixId::Room` case above,
// but then we need to call Room::event_with_context() to get the event
Expand Down
11 changes: 8 additions & 3 deletions src/shared/html_or_plaintext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ live_design! {
quote_fg_color: (MESSAGE_TEXT_COLOR)
}
list_item_layout: { padding: {left: 5.0, top: 1.0, bottom: 1.0}, }
code_layout: { padding: {left: 7.0, right: 7.0, top: 8.0, bottom: 0.0}, }
quote_layout: { padding: {top: 0.0, bottom: 0.0}, }
inline_code_padding: { left: 5.0, right: 5.0, top: 7.0, bottom: 0.0 }
list_item_walk: { margin: { left: 0, right: 0, top: 2, bottom: 4 } }
code_layout: { padding: 10.0 }
code_walk: { margin: { top: 10, bottom: 10, left: 0, right: 0 } }
quote_layout: { spacing: 0, padding: {top: 0.0, bottom: 0.0}, }
quote_walk: { margin: { top: 5, bottom: 5 } }
inline_code_padding: {top: 3, bottom: 3, left: 4, right: 4 }
inline_code_margin: { left: 3, right: 3, bottom: 2, top: 2 }


font = <MatrixHtmlSpan> { }
span = <MatrixHtmlSpan> { }
Expand Down
6 changes: 3 additions & 3 deletions src/shared/text_or_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ live_design! {
}
image_view = <View> {
visible: false,
cursor: NotAllowed, // we don't yet support clicking on the image
cursor: Default, // Use `Hand` once we support clicking on the image
width: Fill, height: Fit,
image = <Image> {
width: Fill, height: Fill,
fit: Size,
width: Fill, height: Fit,
fit: Smallest,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/verification_modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ live_design! {

<RoundedView> {
flow: Down
width: 600
width: 400
height: Fit
padding: {top: 25, right: 30 bottom: 30 left: 45}
spacing: 10
Expand Down

0 comments on commit b5bed86

Please sign in to comment.