Move functions to EuphVault and add EuphRoomVault
This commit moves all euph_* functions from Vault to EuphVault. The previous EuphVault is now called EuphRoomVault and re-exports all room-based functions from the EuphVault. It also implements MsgStore.
This commit is contained in:
parent
ff56bb2678
commit
da2c3d86f5
9 changed files with 148 additions and 163 deletions
|
|
@ -82,7 +82,7 @@ impl Rooms {
|
|||
self.euph_rooms.entry(name.clone()).or_insert_with(|| {
|
||||
EuphRoom::new(
|
||||
self.config.euph_room(&name),
|
||||
self.vault.euph(name),
|
||||
self.vault.euph().room(name),
|
||||
self.ui_event_tx.clone(),
|
||||
)
|
||||
})
|
||||
|
|
@ -97,7 +97,8 @@ impl Rooms {
|
|||
async fn stabilize_rooms(&mut self) {
|
||||
let mut rooms_set = self
|
||||
.vault
|
||||
.euph_rooms()
|
||||
.euph()
|
||||
.rooms()
|
||||
.await
|
||||
.into_iter()
|
||||
.collect::<HashSet<_>>();
|
||||
|
|
@ -484,7 +485,7 @@ impl Rooms {
|
|||
key!(Esc) => self.state = State::ShowList,
|
||||
key!(Enter) if editor.text() == *name => {
|
||||
self.euph_rooms.remove(name);
|
||||
self.vault.euph(name.clone()).delete();
|
||||
self.vault.euph().room(name.clone()).delete();
|
||||
self.state = State::ShowList;
|
||||
}
|
||||
_ => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue