mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
2ab0029d49
Fixes #1141 Closes #4698 // FREEBIE
50 lines
1.5 KiB
Java
50 lines
1.5 KiB
Java
package org.thoughtcrime.securesms;
|
|
|
|
import android.annotation.TargetApi;
|
|
import android.content.Context;
|
|
import android.os.Build;
|
|
import android.support.annotation.NonNull;
|
|
import android.util.AttributeSet;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
|
|
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
|
import org.thoughtcrime.securesms.database.model.ThreadRecord;
|
|
import org.thoughtcrime.securesms.util.ViewUtil;
|
|
|
|
import java.util.Locale;
|
|
import java.util.Set;
|
|
|
|
public class ConversationListItemAction extends LinearLayout implements BindableConversationListItem {
|
|
|
|
private TextView description;
|
|
|
|
public ConversationListItemAction(Context context) {
|
|
super(context);
|
|
}
|
|
|
|
public ConversationListItemAction(Context context, AttributeSet attrs) {
|
|
super(context, attrs);
|
|
}
|
|
|
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
|
public ConversationListItemAction(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
super(context, attrs, defStyleAttr);
|
|
}
|
|
|
|
@Override
|
|
public void onFinishInflate() {
|
|
super.onFinishInflate();
|
|
this.description = ViewUtil.findById(this, R.id.description);
|
|
}
|
|
|
|
@Override
|
|
public void bind(@NonNull MasterSecret masterSecret, @NonNull ThreadRecord thread, @NonNull Locale locale, @NonNull Set<Long> selectedThreads, boolean batchMode) {
|
|
this.description.setText(getContext().getString(R.string.ConversationListItemAction_archived_conversations_d, thread.getCount()));
|
|
}
|
|
|
|
@Override
|
|
public void unbind() {
|
|
|
|
}
|
|
}
|