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

Method renaming

parent e72cbd0b
...@@ -18,7 +18,7 @@ public class RocketChatAbsoluteUrl implements AbsoluteUrl { ...@@ -18,7 +18,7 @@ public class RocketChatAbsoluteUrl implements AbsoluteUrl {
} }
@Override @Override
public String getAbsolute(String url) { public String from(String url) {
return url.startsWith("/") ? baseUrl + url + "?rc_uid=" + userId + "&rc_token=" + token : url; return url.startsWith("/") ? baseUrl + url + "?rc_uid=" + userId + "&rc_token=" + token : url;
} }
} }
...@@ -76,7 +76,7 @@ public class Avatar { ...@@ -76,7 +76,7 @@ public class Avatar {
if (absoluteUrl == null) { if (absoluteUrl == null) {
return avatarUrl; return avatarUrl;
} }
return absoluteUrl.getAbsolute(avatarUrl); return absoluteUrl.from(avatarUrl);
} catch (UnsupportedEncodingException exception) { } catch (UnsupportedEncodingException exception) {
RCLog.e(exception, "failed to get URL for user: %s", username); RCLog.e(exception, "failed to get URL for user: %s", username);
return null; return null;
......
...@@ -2,5 +2,5 @@ package chat.rocket.android.widget; ...@@ -2,5 +2,5 @@ package chat.rocket.android.widget;
public interface AbsoluteUrl { public interface AbsoluteUrl {
String getAbsolute(String url); String from(String url);
} }
...@@ -242,7 +242,7 @@ public class RocketChatMessageAttachmentsLayout extends LinearLayout { ...@@ -242,7 +242,7 @@ public class RocketChatMessageAttachmentsLayout extends LinearLayout {
if (absoluteUrl == null) { if (absoluteUrl == null) {
return url; return url;
} }
return absoluteUrl.getAbsolute(url); return absoluteUrl.from(url);
} }
private void loadImage(final String url, final SimpleDraweeView drawee, final View load, 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