Skip to content

Commit

Permalink
Merge branch 'main' into robrix_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tyreseluo committed Nov 28, 2024
2 parents ca8043b + f495dec commit 656924c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions src/home/room_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2133,7 +2133,7 @@ pub enum TimelineUpdate {
/// resulted in new items being *appended to the end* of the timeline.
is_append: bool,
/// Whether to clear the entire cache of drawn items in the timeline.
/// This supercedes `index_of_first_change` and is used when the entire timeline is being redrawn.
/// This supersedes `index_of_first_change` and is used when the entire timeline is being redrawn.
clear_cache: bool,
},
/// The target event ID was found at the given `index` in the timeline items vector.
Expand Down Expand Up @@ -2250,7 +2250,7 @@ struct TimelineUiState {
/// a reply preview, ends. so we keep a small state for it.
/// By default, it starts in Off.
/// Once the scrolling is started, the state becomes Pending.
/// If the animation was trigged, the state goes back to Off.
/// If the animation was triggered, the state goes back to Off.
message_highlight_animation_state: MessageHighlightAnimationState,

/// The index of the timeline item that was most recently scrolled up past it.
Expand Down Expand Up @@ -2293,7 +2293,7 @@ struct SavedState {
/// of a visible item in the given `curr_items` list.
///
/// This info includes a tuple of:
/// 1. the index of the item in the currennt items list,
/// 1. the index of the item in the current items list,
/// 2. the index of the item in the new items list,
/// 3. the positional "scroll" offset of the corresponding current item in the portal list,
/// 4. the unique event ID of the item.
Expand Down Expand Up @@ -2870,7 +2870,7 @@ fn populate_message_view(
return (item, new_drawn_status);
}

// Set the Message widget's metatdata for reply-handling purposes.
// Set the Message widget's metadata for reply-handling purposes.
item.as_message().set_data(
event_tl_item.can_be_replied_to(),
item_id,
Expand Down Expand Up @@ -3286,7 +3286,7 @@ fn draw_reactions(
return;
}

// The message annotaions view is invisible by default, so we must set it to visible
// The message annotations view is invisible by default, so we must set it to visible
// now that we know there are reactions to show.
message_item
.view(id!(content.message_annotations))
Expand Down
4 changes: 2 additions & 2 deletions src/home/spaces_dock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ live_design! {

Home = <RoundedView> {
width: Fit, height: Fit
// FIXME: the extra padding on the right is becase the icon is not correctly centered
// FIXME: the extra padding on the right is because the icon is not correctly centered
// within its parent
padding: {top: 8, left: 8, right: 12, bottom: 8}
show_bg: true
Expand All @@ -79,7 +79,7 @@ live_design! {

Settings = <View> {
width: Fit, height: Fit
// FIXME: the extra padding on the right is becase the icon is not correctly centered
// FIXME: the extra padding on the right is because the icon is not correctly centered
// within its parent
padding: {top: 8, left: 8, right: 12, bottom: 8}
align: {x: 0.5, y: 0.5}
Expand Down
8 changes: 4 additions & 4 deletions src/shared/adaptive_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub struct AdaptiveView {
#[walk]
walk: Walk,

/// Wether to retain the widget variant state when it goes unused.
/// Whether to retain the widget variant state when it goes unused.
/// While it avoids creating new widgets and keeps their state, be mindful of the memory usage and potential memory leaks.
#[live]
retain_unused_variants: bool,
Expand Down Expand Up @@ -126,7 +126,7 @@ impl WidgetNode for AdaptiveView {
fn find_widgets(&self, path: &[LiveId], cached: WidgetCache, results: &mut WidgetSet) {
if let Some(active_widget) = self.active_widget.as_ref() {
// Currently we cannot rely on querying nested elements (e.g. `self.ui.button(id!(my_button))`) within an AdaptiveView,
// from a non-AdaptiveView parent. This is becuase higher up in the UI tree other widgets have cached the search result.
// from a non-AdaptiveView parent. This is because higher up in the UI tree other widgets have cached the search result.
// Makepad should support a way to prevent caching for scenarios like this.
// TODO(Julian): We'll add a mechanism in Makepad to clear the cache upawards on template change (e.g. InvalidateCache action).
active_widget.widget_ref.find_widgets(path, cached, results);
Expand Down Expand Up @@ -208,7 +208,7 @@ impl WidgetMatchEvent for AdaptiveView {
if cx.has_global::<DisplayContext>() {
let current_context = cx.get_global::<DisplayContext>();
// TODO(Julian): Optimize this by skipping the update on the same event id for different instances
// We should add an accesor in Makepad for cx.event_id
// We should add an accessor in Makepad for cx.event_id
// if current_context.updated_on_event_id == event_id { return }
if current_context.screen_size != ce.new_geom.inner_size {
current_context.updated_on_event_id = redraw_id;
Expand Down Expand Up @@ -326,7 +326,7 @@ type ParentSize = DVec2;
/// A context that is used to determine which view to display in an `AdaptiveView` widget.
/// DisplayContext is stored in a global context so that they can be accessed from multiple `AdaptiveView` widget instances.
/// This will soon be replaced by having this context directly in Makepad's Cx.
/// Later to be expanded with more context data like platfrom information, accessibility settings, etc.
/// Later to be expanded with more context data like platform information, accessibility settings, etc.
#[derive(Clone, Debug)]
pub struct DisplayContext {
pub updated_on_event_id: u64,
Expand Down
2 changes: 1 addition & 1 deletion src/shared/jump_to_bottom_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl JumpToBottomButton {
/// the unread message badge are made invisible, because we consider all messages
/// to be read by the user if the timeline has reached the bottom.
/// * If `is_at_bottom` is `false`, only the main jump to bottom "parent" view
/// is made visibile; the unread message badge is *not* made visible, as that is done
/// is made visible; the unread message badge is *not* made visible, as that is done
/// via a separate call to [`JumpToBottomButton::show_unread_message_badge()`].
pub fn update_visibility(&mut self, is_at_bottom: bool) {
if is_at_bottom {
Expand Down
2 changes: 1 addition & 1 deletion src/sliding_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1861,7 +1861,7 @@ async fn timeline_subscriber_handler(

/// Updates the latest event for the given room.
///
/// This function handles room name changes and checks for (but does not direclty handle)
/// This function handles room name changes and checks for (but does not directly handle)
/// room avatar changes.
///
/// Returns `true` if this latest event indicates that the room's avatar has changed
Expand Down
6 changes: 3 additions & 3 deletions src/verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ use tokio::{runtime::Handle, sync::mpsc::{UnboundedReceiver, UnboundedSender}};


pub fn add_verification_event_handlers_and_sync_client(client: Client) {
let mut verficiation_state_subscriber = client.encryption().verification_state();
log!("Initial verification state is {:?}", verficiation_state_subscriber.get());
let mut verification_state_subscriber = client.encryption().verification_state();
log!("Initial verification state is {:?}", verification_state_subscriber.get());
Handle::current().spawn(async move {
while let Some(state) = verficiation_state_subscriber.next().await {
while let Some(state) = verification_state_subscriber.next().await {
log!("Received a verification state update: {state:?}");
// TODO: send an update to the main top-level app instance
// such that we can display the verification state as an icon badge
Expand Down

0 comments on commit 656924c

Please sign in to comment.