Fixes issue #198
This commit is contained in:
parent
76d16fadaa
commit
e482789d41
|
@ -110,6 +110,15 @@ public class ShowConversationActivity extends BaseActivity implements OnRetrieve
|
||||||
ImageView action_refresh = getSupportActionBar().getCustomView().findViewById(R.id.action_refresh);
|
ImageView action_refresh = getSupportActionBar().getCustomView().findViewById(R.id.action_refresh);
|
||||||
title.setText(R.string.conversation);
|
title.setText(R.string.conversation);
|
||||||
ImageView close_conversation = getSupportActionBar().getCustomView().findViewById(R.id.close_conversation);
|
ImageView close_conversation = getSupportActionBar().getCustomView().findViewById(R.id.close_conversation);
|
||||||
|
|
||||||
|
view.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if( lv_status != null) {
|
||||||
|
lv_status.setAdapter(statusListAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
if( close_conversation != null){
|
if( close_conversation != null){
|
||||||
close_conversation.setOnClickListener(new View.OnClickListener() {
|
close_conversation.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -136,6 +145,7 @@ public class ShowConversationActivity extends BaseActivity implements OnRetrieve
|
||||||
}else{
|
}else{
|
||||||
setTitle(R.string.conversation);
|
setTitle(R.string.conversation);
|
||||||
}
|
}
|
||||||
|
|
||||||
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||||
Account account = new AccountDAO(getApplicationContext(),db).getAccountByID(userId);
|
Account account = new AccountDAO(getApplicationContext(),db).getAccountByID(userId);
|
||||||
|
|
|
@ -15,6 +15,7 @@ package fr.gouv.etalab.mastodon.drawers;
|
||||||
* see <http://www.gnu.org/licenses>. */
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.Activity;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
@ -881,6 +882,35 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
holder.main_container.setBackgroundResource(R.color.mastodonC1_);
|
holder.main_container.setBackgroundResource(R.color.mastodonC1_);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
|
||||||
|
holder.status_content.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(context, ShowConversationActivity.class);
|
||||||
|
Bundle b = new Bundle();
|
||||||
|
if( status.getReblog() == null)
|
||||||
|
b.putString("statusId", status.getId());
|
||||||
|
else
|
||||||
|
b.putString("statusId", status.getReblog().getId());
|
||||||
|
intent.putExtras(b);
|
||||||
|
context.startActivity(intent);
|
||||||
|
((ShowConversationActivity)context).finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
holder.main_container.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(context, ShowConversationActivity.class);
|
||||||
|
Bundle b = new Bundle();
|
||||||
|
if( status.getReblog() == null)
|
||||||
|
b.putString("statusId", status.getId());
|
||||||
|
else
|
||||||
|
b.putString("statusId", status.getReblog().getId());
|
||||||
|
intent.putExtras(b);
|
||||||
|
context.startActivity(intent);
|
||||||
|
((ShowConversationActivity)context).finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
if( position == conversationPosition){
|
if( position == conversationPosition){
|
||||||
if( theme == Helper.THEME_LIGHT)
|
if( theme == Helper.THEME_LIGHT)
|
||||||
holder.main_container.setBackgroundResource(R.color.mastodonC3_);
|
holder.main_container.setBackgroundResource(R.color.mastodonC3_);
|
||||||
|
|
|
@ -246,9 +246,11 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:id="@+id/status_cardview_video"
|
android:id="@+id/status_cardview_video"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="300dp"
|
||||||
android:layout_height="220dp">
|
android:layout_height="220dp"
|
||||||
|
tools:ignore="WebViewLayout">
|
||||||
<WebView
|
<WebView
|
||||||
android:id="@+id/status_cardview_webview"
|
android:id="@+id/status_cardview_webview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in New Issue