Adds live instance

This commit is contained in:
stom79 2018-01-26 11:13:07 +01:00
parent 987f8602eb
commit 48e816f021
2 changed files with 7 additions and 1 deletions

View File

@ -78,6 +78,7 @@ import fr.gouv.etalab.mastodon.helper.Helper;
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_DARK;
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
import static fr.gouv.etalab.mastodon.helper.Helper.getLiveInstance;
/**
@ -658,6 +659,8 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
@Override
public void run() {
String name = "@"+(status.getReblog()!=null?status.getReblog().getAccount().getAcct():status.getAccount().getAcct());
if( name.split("@", -1).length - 1 == 1)
name = name + "@" + getLiveInstance(context);
Bitmap bitmap = Helper.convertTootIntoBitmap(context, name, holder.notification_status_content);
Intent intent = new Intent(context, TootActivity.class);
Bundle b = new Bundle();

View File

@ -115,6 +115,7 @@ import fr.gouv.etalab.mastodon.sqlite.TempMuteDAO;
import static fr.gouv.etalab.mastodon.activities.MainActivity.currentLocale;
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_DARK;
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
import static fr.gouv.etalab.mastodon.helper.Helper.getLiveInstance;
/**
@ -1256,7 +1257,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
break;
case R.id.action_copy:
ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
String content;
final String content;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
content = Html.fromHtml(status.getContent(), Html.FROM_HTML_MODE_LEGACY).toString();
else
@ -1295,6 +1296,8 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
@Override
public void run() {
String name = "@"+(status.getReblog()!=null?status.getReblog().getAccount().getAcct():status.getAccount().getAcct());
if( name.split("@", -1).length - 1 == 1)
name = name + "@" + getLiveInstance(context);
Bitmap bitmap = Helper.convertTootIntoBitmap(context, name, holder.status_content);
Intent intent = new Intent(context, TootActivity.class);
Bundle b = new Bundle();