Browse Source

Loading the first room at init

environments/review-jsparber-h-cxnwl8/deployments/1
Daniel García Moreno 9 years ago
parent
commit
4ce6a50b22
  1. 10
      src/app.rs

10
src/app.rs

@ -220,11 +220,21 @@ impl AppOp {
array.sort_by(|x, y| x.0.to_lowercase().cmp(&y.0.to_lowercase()));
let mut default: Option<(String, String)> = None;
for v in array {
if default.is_none() {
default = Some((v.0.clone(), v.1.clone()));
}
store.insert_with_values(None, None,
&[0, 1],
&[&v.0, &v.1]);
}
if let Some(def) = default {
self.set_active_room(def.1, def.0);
}
}
pub fn get_room_messages(&self) {

Loading…
Cancel
Save