mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 07:14:50 +01:00
chore: my_user -> current_user
This commit is contained in:
parent
9a4225cf0d
commit
3bf620d41a
2 changed files with 5 additions and 5 deletions
|
@ -203,7 +203,7 @@ impl Client {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the currently logged in user.
|
/// Get the currently logged in user.
|
||||||
pub fn my_user(&self) -> &User {
|
pub fn current_user(&self) -> &User {
|
||||||
&self.0.user
|
&self.0.user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,15 +7,15 @@ use crate::{
|
||||||
use jni_toolbox::jni;
|
use jni_toolbox::jni;
|
||||||
|
|
||||||
/// Connect using the given credentials to the default server, and return a [Client] to interact with it.
|
/// Connect using the given credentials to the default server, and return a [Client] to interact with it.
|
||||||
#[jni(package = "mp.code", class = "Client", ptr)]
|
#[jni(package = "mp.code", class = "Client")]
|
||||||
fn connect(config: Config) -> Result<Client, ConnectionError> {
|
fn connect(config: Config) -> Result<Client, ConnectionError> {
|
||||||
super::tokio().block_on(Client::connect(config))
|
super::tokio().block_on(Client::connect(config))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the current [crate::api::User].
|
/// Gets the current [crate::api::User].
|
||||||
#[jni(package = "mp.code", class = "Client", ptr)]
|
#[jni(package = "mp.code", class = "Client")]
|
||||||
fn get_user(client: &mut Client) -> crate::api::User {
|
fn current_user(client: &mut Client) -> crate::api::User {
|
||||||
client.user().clone()
|
client.current_user().clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Join a [Workspace] and return a pointer to it.
|
/// Join a [Workspace] and return a pointer to it.
|
||||||
|
|
Loading…
Reference in a new issue