mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-22 21:04:53 +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.
|
||||
pub fn my_user(&self) -> &User {
|
||||
pub fn current_user(&self) -> &User {
|
||||
&self.0.user
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,15 +7,15 @@ use crate::{
|
|||
use jni_toolbox::jni;
|
||||
|
||||
/// 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> {
|
||||
super::tokio().block_on(Client::connect(config))
|
||||
}
|
||||
|
||||
/// Gets the current [crate::api::User].
|
||||
#[jni(package = "mp.code", class = "Client", ptr)]
|
||||
fn get_user(client: &mut Client) -> crate::api::User {
|
||||
client.user().clone()
|
||||
#[jni(package = "mp.code", class = "Client")]
|
||||
fn current_user(client: &mut Client) -> crate::api::User {
|
||||
client.current_user().clone()
|
||||
}
|
||||
|
||||
/// Join a [Workspace] and return a pointer to it.
|
||||
|
|
Loading…
Reference in a new issue