Skip to content

Commit 6b74262

Browse files
committed
update reqwest_client and get scope building
1 parent 022edc0 commit 6b74262

File tree

4 files changed

+46
-54
lines changed

4 files changed

+46
-54
lines changed

Cargo.lock

Lines changed: 37 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ members = ["src/ui", "src/cache", "src/chat", "src/discord"]
44

55
[workspace.dependencies]
66
chrono = "0.4.38"
7-
gpui = { git = "https://github.com/scopeclient/zed.git", branch = "export-platform-window", default-features = false, features = [
7+
gpui = { git = "https://github.com/scopeclient/zed.git", branch = "feature/export-platform-window", default-features = false, features = [
88
"http_client",
99
"font-kit",
1010
] }
1111
components = { package = "ui", git = "https://github.com/scopeclient/components", version = "0.1.0" }
12+
reqwest_client = { git = "https://github.com/scopeclient/zed.git", branch = "feature/export-platform-window", version = "0.1.0" }

src/ui/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ keywords = ["discord", "scope", "reticle"]
1414

1515
[dependencies]
1616
gpui.workspace = true
17-
reqwest_client = { git = "https://github.com/huacnlee/zed.git", branch = "export-platform-window", version = "0.1.0" }
17+
reqwest_client.workspace = true
1818
scope-chat = { version = "0.1.0", path = "../chat" }
1919
scope-util = { version = "0.1.0", path = "../util" }
2020
scope-backend-discord = { version = "0.1.0", path = "../discord" }

src/ui/src/channel/message.rs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use gpui::{div, img, rgb, Element, IntoElement, ParentElement, Styled};
2-
use gpui::prelude::FluentBuilder;
31
use chrono::Local;
2+
use gpui::prelude::FluentBuilder;
3+
use gpui::{div, img, rgb, Element, IntoElement, ParentElement, Styled, StyledImage};
44
use scope_chat::message::{Message, MessageAuthor};
55

66
#[derive(Clone)]
@@ -26,7 +26,7 @@ impl<M: Message> MessageGroup<M> {
2626
self.contents.push(message);
2727
}
2828

29-
pub fn contents(&self) -> impl IntoIterator<Item=impl Element + '_> {
29+
pub fn contents(&self) -> impl IntoIterator<Item = impl Element + '_> {
3030
self.contents.iter().map(|v| v.get_content())
3131
}
3232

@@ -74,19 +74,9 @@ pub fn message<M: Message>(message: MessageGroup<M>) -> impl IntoElement {
7474
// enabling this, and thus enabling ellipsis causes a consistent panic!?
7575
// .child(div().text_ellipsis().min_w_0().child(message.get_author().get_display_name()))
7676
.child(
77-
div()
78-
.min_w_0()
79-
.flex()
80-
.gap_2()
81-
.child(message.get_author().get_display_name())
82-
.when_some(message.last().get_timestamp(), |d, ts| {
83-
d.child(
84-
div()
85-
.min_w_0()
86-
.text_color(rgb(0xAFBAC7))
87-
.text_sm()
88-
.child(ts.with_timezone(&Local).format("%I:%M %p").to_string()))
89-
})
77+
div().min_w_0().flex().gap_2().child(message.get_author().get_display_name()).when_some(message.last().get_timestamp(), |d, ts| {
78+
d.child(div().min_w_0().text_color(rgb(0xAFBAC7)).text_sm().child(ts.with_timezone(&Local).format("%I:%M %p").to_string()))
79+
}),
9080
)
9181
.children(message.contents()),
9282
)

0 commit comments

Comments
 (0)