Commit 8ef54741 authored by Tiago Cunha's avatar Tiago Cunha

Method renaming

parent e72cbd0b
......@@ -18,7 +18,7 @@ public class RocketChatAbsoluteUrl implements AbsoluteUrl {
}
@Override
public String getAbsolute(String url) {
public String from(String url) {
return url.startsWith("/") ? baseUrl + url + "?rc_uid=" + userId + "&rc_token=" + token : url;
}
}
......@@ -76,7 +76,7 @@ public class Avatar {
if (absoluteUrl == null) {
return avatarUrl;
}
return absoluteUrl.getAbsolute(avatarUrl);
return absoluteUrl.from(avatarUrl);
} catch (UnsupportedEncodingException exception) {
RCLog.e(exception, "failed to get URL for user: %s", username);
return null;
......
......@@ -2,5 +2,5 @@ package chat.rocket.android.widget;
public interface AbsoluteUrl {
String getAbsolute(String url);
String from(String url);
}
......@@ -242,7 +242,7 @@ public class RocketChatMessageAttachmentsLayout extends LinearLayout {
if (absoluteUrl == null) {
return url;
}
return absoluteUrl.getAbsolute(url);
return absoluteUrl.from(url);
}
private void loadImage(final String url, final SimpleDraweeView drawee, final View load,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment