Detailed changes
@@ -115,10 +115,6 @@ impl ChannelStore {
}
}
- pub fn is_channel_invite_pending(&self, channel: &Arc<Channel>) -> bool {
- false
- }
-
pub fn remove_channel(&self, channel_id: ChannelId) -> impl Future<Output = Result<()>> {
let client = self.client.clone();
async move {
@@ -127,6 +123,10 @@ impl ChannelStore {
}
}
+ pub fn is_channel_invite_pending(&self, _: &Arc<Channel>) -> bool {
+ false
+ }
+
pub fn remove_member(
&self,
channel_id: ChannelId,
@@ -144,10 +144,6 @@ impl ChannelStore {
todo!()
}
- pub fn add_guest_channel(&self, channel_id: ChannelId) -> Task<Result<()>> {
- todo!()
- }
-
async fn handle_update_channels(
this: ModelHandle<Self>,
message: TypedEnvelope<proto::UpdateChannels>,
@@ -1080,7 +1080,7 @@ test_both_dbs!(
test_channel_invites_sqlite,
db,
{
- let owner_id = db.create_server("test").await.unwrap().0 as u32;
+ db.create_server("test").await.unwrap();
let user_1 = db
.create_user(
@@ -10,8 +10,6 @@ use gpui::{
AnyElement, Axis, Element, LayoutContext, SceneBuilder, View, ViewContext,
};
-use crate::CollabTitlebarItem;
-
pub(crate) struct FacePile<V: View> {
overlap: f32,
faces: Vec<AnyElement<V>>,
@@ -1259,8 +1259,8 @@ impl CollabPanel {
fn render_channel_editor(
&self,
- theme: &theme::CollabPanel,
- depth: usize,
+ _theme: &theme::CollabPanel,
+ _depth: usize,
cx: &AppContext,
) -> AnyElement<Self> {
ChildView::new(&self.channel_name_editor, cx).into_any()
@@ -1276,7 +1276,7 @@ impl CollabPanel {
let channel_id = channel.id;
MouseEventHandler::<Channel, Self>::new(channel.id as usize, cx, |state, cx| {
Flex::row()
- .with_child({ Svg::new("icons/file_icons/hash.svg").aligned().left() })
+ .with_child(Svg::new("icons/file_icons/hash.svg").aligned().left())
.with_child(
Label::new(channel.name.clone(), theme.contact_username.text.clone())
.contained()
@@ -1329,12 +1329,7 @@ impl CollabPanel {
let button_spacing = theme.contact_button_spacing;
Flex::row()
- .with_child({
- Svg::new("icons/file_icons/hash.svg")
- // .with_style(theme.contact_avatar)
- .aligned()
- .left()
- })
+ .with_child(Svg::new("icons/file_icons/hash.svg").aligned().left())
.with_child(
Label::new(channel.name.clone(), theme.contact_username.text.clone())
.contained()
@@ -1616,7 +1611,7 @@ impl CollabPanel {
}
}
} else if let Some((editing_state, channel_name)) = self.take_editing_state(cx) {
- let create_channel = self.channel_store.update(cx, |channel_store, cx| {
+ let create_channel = self.channel_store.update(cx, |channel_store, _| {
channel_store.create_channel(&channel_name, editing_state.parent_id)
});
@@ -1687,7 +1682,7 @@ impl CollabPanel {
cx.spawn(|_, mut cx| async move {
if answer.next().await == Some(0) {
if let Err(e) = channel_store
- .update(&mut cx, |channels, cx| channels.remove_channel(channel_id))
+ .update(&mut cx, |channels, _| channels.remove_channel(channel_id))
.await
{
cx.prompt(
@@ -9,7 +9,7 @@ pub fn init(cx: &mut AppContext) {
pub struct ChannelModal {
has_focus: bool,
- input_editor: ViewHandle<Editor>,
+ filter_editor: ViewHandle<Editor>,
}
pub enum Event {
@@ -30,7 +30,7 @@ impl ChannelModal {
ChannelModal {
has_focus: false,
- input_editor,
+ filter_editor: input_editor,
}
}
@@ -55,7 +55,7 @@ impl View for ChannelModal {
enum ChannelModal {}
MouseEventHandler::<ChannelModal, _>::new(0, cx, |_, cx| {
Flex::column()
- .with_child(ChildView::new(self.input_editor.as_any(), cx))
+ .with_child(ChildView::new(self.filter_editor.as_any(), cx))
.with_child(Label::new("ADD OR BROWSE CHANNELS HERE", style))
.contained()
.with_style(modal_container)
@@ -71,7 +71,7 @@ impl View for ChannelModal {
fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
self.has_focus = true;
if cx.is_self_focused() {
- cx.focus(&self.input_editor);
+ cx.focus(&self.filter_editor);
}
}
@@ -1,3 +1,6 @@
#!/bin/bash
-ZED_ADMIN_API_TOKEN=secret ZED_IMPERSONATE=as-cii ZED_SERVER_URL=http://localhost:8080 cargo run $@
+: "${ZED_IMPERSONATE:=as-cii}"
+export ZED_IMPERSONATE
+
+ZED_ADMIN_API_TOKEN=secret ZED_SERVER_URL=http://localhost:8080 cargo run $@
@@ -28,6 +28,7 @@ module.exports = {
},
rules: {
"linebreak-style": ["error", "unix"],
+ "@typescript-eslint/no-explicit-any": "off",
semi: ["error", "never"],
},
}
@@ -8,6 +8,7 @@ import {
import { interactive, toggleable } from "../element"
import { useTheme } from "../theme"
+
export default function contacts_panel(): any {
const theme = useTheme()
@@ -24,5 +24,7 @@
"useUnknownInCatchVariables": false,
"baseUrl": "."
},
- "exclude": ["node_modules"]
+ "exclude": [
+ "node_modules"
+ ]
}