2013-10-25 17:19:00 +02:00
|
|
|
/*
|
2013-12-20 20:25:49 +01:00
|
|
|
* This is the source code of Telegram for Android v. 1.3.2.
|
2013-10-25 17:19:00 +02:00
|
|
|
* It is licensed under GNU GPL v. 2 or later.
|
|
|
|
* You should have received a copy of the license in this archive (see LICENSE).
|
|
|
|
*
|
|
|
|
* Copyright Nikolai Kudashov, 2013.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package org.telegram.ui;
|
|
|
|
|
2014-03-22 23:31:55 +01:00
|
|
|
import android.app.ProgressDialog;
|
2013-10-25 17:19:00 +02:00
|
|
|
import android.content.Context;
|
|
|
|
import android.content.DialogInterface;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.widget.EditText;
|
2014-11-13 21:10:14 +01:00
|
|
|
import android.widget.ListView;
|
2013-10-25 17:19:00 +02:00
|
|
|
import android.widget.TextView;
|
|
|
|
|
2014-08-22 16:24:33 +02:00
|
|
|
import org.telegram.android.AndroidUtilities;
|
2014-03-22 23:31:55 +01:00
|
|
|
import org.telegram.messenger.ConnectionsManager;
|
2014-07-03 00:39:05 +02:00
|
|
|
import org.telegram.android.LocaleController;
|
|
|
|
import org.telegram.android.MessagesStorage;
|
2014-02-28 23:28:25 +01:00
|
|
|
import org.telegram.messenger.TLRPC;
|
2013-12-20 20:25:49 +01:00
|
|
|
import org.telegram.messenger.FileLog;
|
2014-07-03 00:39:05 +02:00
|
|
|
import org.telegram.android.MessagesController;
|
2014-08-22 16:24:33 +02:00
|
|
|
import org.telegram.android.NotificationCenter;
|
2013-10-25 17:19:00 +02:00
|
|
|
import org.telegram.messenger.R;
|
2014-11-13 21:10:14 +01:00
|
|
|
import org.telegram.ui.Adapters.BaseFragmentAdapter;
|
2014-11-10 12:05:22 +01:00
|
|
|
import org.telegram.ui.Cells.UserCell;
|
2014-11-13 21:10:14 +01:00
|
|
|
import org.telegram.ui.ActionBar.ActionBar;
|
|
|
|
import org.telegram.ui.ActionBar.ActionBarMenu;
|
2014-11-06 22:34:47 +01:00
|
|
|
import org.telegram.ui.Views.AvatarDrawable;
|
2013-10-25 17:19:00 +02:00
|
|
|
import org.telegram.ui.Views.AvatarUpdater;
|
|
|
|
import org.telegram.ui.Views.BackupImageView;
|
2014-11-13 21:10:14 +01:00
|
|
|
import org.telegram.ui.ActionBar.BaseFragment;
|
2013-10-25 17:19:00 +02:00
|
|
|
|
|
|
|
import java.util.ArrayList;
|
2014-03-26 21:16:28 +01:00
|
|
|
import java.util.concurrent.Semaphore;
|
2013-10-25 17:19:00 +02:00
|
|
|
|
|
|
|
public class GroupCreateFinalActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate, AvatarUpdater.AvatarUpdaterDelegate {
|
2014-11-13 21:10:14 +01:00
|
|
|
private ListView listView;
|
2014-03-26 21:16:28 +01:00
|
|
|
private EditText nameTextView;
|
2013-10-25 17:19:00 +02:00
|
|
|
private TLRPC.FileLocation avatar;
|
2013-12-20 20:25:49 +01:00
|
|
|
private TLRPC.InputFile uploadedAvatar;
|
2013-10-25 17:19:00 +02:00
|
|
|
private ArrayList<Integer> selectedContacts;
|
|
|
|
private BackupImageView avatarImage;
|
2014-11-06 22:34:47 +01:00
|
|
|
private AvatarDrawable avatarDrawable;
|
2013-10-25 17:19:00 +02:00
|
|
|
private boolean createAfterUpload;
|
|
|
|
private boolean donePressed;
|
|
|
|
private AvatarUpdater avatarUpdater = new AvatarUpdater();
|
2014-03-22 23:31:55 +01:00
|
|
|
private ProgressDialog progressDialog = null;
|
2014-03-26 21:16:28 +01:00
|
|
|
private String nameToSet = null;
|
2014-07-27 00:28:33 +02:00
|
|
|
private boolean isBroadcast = false;
|
2013-10-25 17:19:00 +02:00
|
|
|
|
2014-06-04 01:31:48 +02:00
|
|
|
private final static int done_button = 1;
|
|
|
|
|
|
|
|
public GroupCreateFinalActivity(Bundle args) {
|
|
|
|
super(args);
|
2014-07-27 00:28:33 +02:00
|
|
|
isBroadcast = args.getBoolean("broadcast", false);
|
2014-11-10 12:05:22 +01:00
|
|
|
avatarDrawable = new AvatarDrawable();
|
2014-06-04 01:31:48 +02:00
|
|
|
}
|
|
|
|
|
2013-10-25 17:19:00 +02:00
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
@Override
|
|
|
|
public boolean onFragmentCreate() {
|
2014-08-22 16:24:33 +02:00
|
|
|
NotificationCenter.getInstance().addObserver(this, NotificationCenter.updateInterfaces);
|
|
|
|
NotificationCenter.getInstance().addObserver(this, NotificationCenter.chatDidCreated);
|
|
|
|
NotificationCenter.getInstance().addObserver(this, NotificationCenter.chatDidFailCreate);
|
2013-10-25 17:19:00 +02:00
|
|
|
avatarUpdater.parentFragment = this;
|
|
|
|
avatarUpdater.delegate = this;
|
2014-03-26 21:16:28 +01:00
|
|
|
selectedContacts = getArguments().getIntegerArrayList("result");
|
|
|
|
final ArrayList<Integer> usersToLoad = new ArrayList<Integer>();
|
|
|
|
for (Integer uid : selectedContacts) {
|
2014-08-22 16:24:33 +02:00
|
|
|
if (MessagesController.getInstance().getUser(uid) == null) {
|
2014-03-26 21:16:28 +01:00
|
|
|
usersToLoad.add(uid);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!usersToLoad.isEmpty()) {
|
|
|
|
final Semaphore semaphore = new Semaphore(0);
|
|
|
|
final ArrayList<TLRPC.User> users = new ArrayList<TLRPC.User>();
|
2014-10-31 20:02:29 +01:00
|
|
|
MessagesStorage.getInstance().getStorageQueue().postRunnable(new Runnable() {
|
2014-03-26 21:16:28 +01:00
|
|
|
@Override
|
|
|
|
public void run() {
|
2014-10-23 17:30:35 +02:00
|
|
|
users.addAll(MessagesStorage.getInstance().getUsers(usersToLoad));
|
2014-03-26 21:16:28 +01:00
|
|
|
semaphore.release();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
try {
|
|
|
|
semaphore.acquire();
|
|
|
|
} catch (Exception e) {
|
|
|
|
FileLog.e("tmessages", e);
|
|
|
|
}
|
2014-10-23 17:30:35 +02:00
|
|
|
if (usersToLoad.size() != users.size()) {
|
2014-03-26 21:16:28 +01:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if (!users.isEmpty()) {
|
|
|
|
for (TLRPC.User user : users) {
|
2014-08-22 16:24:33 +02:00
|
|
|
MessagesController.getInstance().putUser(user, true);
|
2014-03-26 21:16:28 +01:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2014-06-04 01:31:48 +02:00
|
|
|
return super.onFragmentCreate();
|
2013-10-25 17:19:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFragmentDestroy() {
|
|
|
|
super.onFragmentDestroy();
|
2014-08-22 16:24:33 +02:00
|
|
|
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.updateInterfaces);
|
|
|
|
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.chatDidCreated);
|
|
|
|
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.chatDidFailCreate);
|
2013-10-25 17:19:00 +02:00
|
|
|
avatarUpdater.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-06-04 01:31:48 +02:00
|
|
|
public View createView(LayoutInflater inflater, ViewGroup container) {
|
2013-10-25 17:19:00 +02:00
|
|
|
if (fragmentView == null) {
|
2014-11-11 23:16:17 +01:00
|
|
|
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
|
|
|
|
actionBar.setBackOverlay(R.layout.updating_state_layout);
|
2014-07-27 00:28:33 +02:00
|
|
|
if (isBroadcast) {
|
2014-11-11 23:16:17 +01:00
|
|
|
actionBar.setTitle(LocaleController.getString("NewBroadcastList", R.string.NewBroadcastList));
|
2014-07-27 00:28:33 +02:00
|
|
|
} else {
|
2014-11-11 23:16:17 +01:00
|
|
|
actionBar.setTitle(LocaleController.getString("NewGroup", R.string.NewGroup));
|
2014-07-27 00:28:33 +02:00
|
|
|
}
|
2014-06-04 01:31:48 +02:00
|
|
|
|
2014-11-11 23:16:17 +01:00
|
|
|
actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {
|
2014-06-04 01:31:48 +02:00
|
|
|
@Override
|
|
|
|
public void onItemClick(int id) {
|
|
|
|
if (id == -1) {
|
|
|
|
finishFragment();
|
|
|
|
} else if (id == done_button) {
|
|
|
|
if (donePressed) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (nameTextView.getText().length() == 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
donePressed = true;
|
|
|
|
|
2014-07-27 00:28:33 +02:00
|
|
|
if (isBroadcast) {
|
|
|
|
MessagesController.getInstance().createChat(nameTextView.getText().toString(), selectedContacts, uploadedAvatar, isBroadcast);
|
2014-06-04 01:31:48 +02:00
|
|
|
} else {
|
2014-07-27 00:28:33 +02:00
|
|
|
if (avatarUpdater.uploadingAvatar != null) {
|
|
|
|
createAfterUpload = true;
|
|
|
|
} else {
|
|
|
|
progressDialog = new ProgressDialog(getParentActivity());
|
|
|
|
progressDialog.setMessage(LocaleController.getString("Loading", R.string.Loading));
|
|
|
|
progressDialog.setCanceledOnTouchOutside(false);
|
|
|
|
progressDialog.setCancelable(false);
|
2014-06-04 01:31:48 +02:00
|
|
|
|
2014-07-27 00:28:33 +02:00
|
|
|
final long reqId = MessagesController.getInstance().createChat(nameTextView.getText().toString(), selectedContacts, uploadedAvatar, isBroadcast);
|
2014-06-04 01:31:48 +02:00
|
|
|
|
2014-07-27 00:28:33 +02:00
|
|
|
progressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, LocaleController.getString("Cancel", R.string.Cancel), new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
ConnectionsManager.getInstance().cancelRpc(reqId, true);
|
|
|
|
donePressed = false;
|
|
|
|
try {
|
|
|
|
dialog.dismiss();
|
|
|
|
} catch (Exception e) {
|
|
|
|
FileLog.e("tmessages", e);
|
|
|
|
}
|
2014-06-04 01:31:48 +02:00
|
|
|
}
|
2014-07-27 00:28:33 +02:00
|
|
|
});
|
|
|
|
progressDialog.show();
|
|
|
|
}
|
2014-06-04 01:31:48 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-11-11 23:16:17 +01:00
|
|
|
ActionBarMenu menu = actionBar.createMenu();
|
2014-06-04 01:31:48 +02:00
|
|
|
View doneItem = menu.addItemResource(done_button, R.layout.group_create_done_layout);
|
|
|
|
|
|
|
|
TextView doneTextView = (TextView)doneItem.findViewById(R.id.done_button);
|
2014-06-12 17:53:20 +02:00
|
|
|
doneTextView.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
|
2014-06-04 01:31:48 +02:00
|
|
|
|
2013-10-25 17:19:00 +02:00
|
|
|
fragmentView = inflater.inflate(R.layout.group_create_final_layout, container, false);
|
|
|
|
|
2014-11-13 21:10:14 +01:00
|
|
|
if (!isBroadcast) {
|
|
|
|
/*button2.setOnClickListener(new View.OnClickListener() {
|
2014-07-27 00:28:33 +02:00
|
|
|
@Override
|
|
|
|
public void onClick(View view) {
|
|
|
|
if (getParentActivity() == null) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
2013-10-25 17:19:00 +02:00
|
|
|
|
2014-07-27 00:28:33 +02:00
|
|
|
CharSequence[] items;
|
2013-10-25 17:19:00 +02:00
|
|
|
|
2014-07-27 00:28:33 +02:00
|
|
|
if (avatar != null) {
|
|
|
|
items = new CharSequence[]{LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley), LocaleController.getString("DeletePhoto", R.string.DeletePhoto)};
|
|
|
|
} else {
|
|
|
|
items = new CharSequence[]{LocaleController.getString("FromCamera", R.string.FromCamera), LocaleController.getString("FromGalley", R.string.FromGalley)};
|
|
|
|
}
|
2013-10-25 17:19:00 +02:00
|
|
|
|
2014-07-27 00:28:33 +02:00
|
|
|
builder.setItems(items, new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialogInterface, int i) {
|
|
|
|
if (i == 0) {
|
|
|
|
avatarUpdater.openCamera();
|
|
|
|
} else if (i == 1) {
|
|
|
|
avatarUpdater.openGallery();
|
|
|
|
} else if (i == 2) {
|
|
|
|
avatar = null;
|
|
|
|
uploadedAvatar = null;
|
2014-11-06 22:34:47 +01:00
|
|
|
avatarImage.setImage(avatar, "50_50", avatarDrawable);
|
2014-07-27 00:28:33 +02:00
|
|
|
}
|
2013-10-25 17:19:00 +02:00
|
|
|
}
|
2014-07-27 00:28:33 +02:00
|
|
|
});
|
|
|
|
showAlertDialog(builder);
|
|
|
|
}
|
2014-11-13 21:10:14 +01:00
|
|
|
});*/
|
2014-07-27 00:28:33 +02:00
|
|
|
}
|
2013-10-25 17:19:00 +02:00
|
|
|
|
|
|
|
avatarImage = (BackupImageView)fragmentView.findViewById(R.id.settings_avatar_image);
|
2014-11-06 22:34:47 +01:00
|
|
|
avatarDrawable.setInfo(3, null, null, isBroadcast);
|
|
|
|
avatarImage.setImageDrawable(avatarDrawable);
|
2013-10-25 17:19:00 +02:00
|
|
|
|
|
|
|
nameTextView = (EditText)fragmentView.findViewById(R.id.bubble_input_text);
|
2014-07-27 00:28:33 +02:00
|
|
|
if (isBroadcast) {
|
|
|
|
nameTextView.setHint(LocaleController.getString("EnterListName", R.string.EnterListName));
|
|
|
|
} else {
|
|
|
|
nameTextView.setHint(LocaleController.getString("EnterGroupNamePlaceholder", R.string.EnterGroupNamePlaceholder));
|
|
|
|
}
|
2014-03-26 21:16:28 +01:00
|
|
|
if (nameToSet != null) {
|
|
|
|
nameTextView.setText(nameToSet);
|
|
|
|
nameToSet = null;
|
|
|
|
}
|
2014-11-13 21:10:14 +01:00
|
|
|
listView = (ListView)fragmentView.findViewById(R.id.listView);
|
2014-06-04 01:31:48 +02:00
|
|
|
listView.setAdapter(new ListAdapter(getParentActivity()));
|
2013-10-25 17:19:00 +02:00
|
|
|
} else {
|
|
|
|
ViewGroup parent = (ViewGroup)fragmentView.getParent();
|
|
|
|
if (parent != null) {
|
|
|
|
parent.removeView(fragmentView);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return fragmentView;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2013-12-20 20:25:49 +01:00
|
|
|
public void didUploadedPhoto(final TLRPC.InputFile file, final TLRPC.PhotoSize small, final TLRPC.PhotoSize big) {
|
2014-11-06 22:34:47 +01:00
|
|
|
AndroidUtilities.runOnUIThread(new Runnable() {
|
2013-10-25 17:19:00 +02:00
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
uploadedAvatar = file;
|
|
|
|
avatar = small.location;
|
2014-11-06 22:34:47 +01:00
|
|
|
avatarImage.setImage(avatar, "50_50", avatarDrawable);
|
2013-10-25 17:19:00 +02:00
|
|
|
if (createAfterUpload) {
|
2013-12-20 20:25:49 +01:00
|
|
|
FileLog.e("tmessages", "avatar did uploaded");
|
2014-07-27 00:28:33 +02:00
|
|
|
MessagesController.getInstance().createChat(nameTextView.getText().toString(), selectedContacts, uploadedAvatar, false);
|
2013-10-25 17:19:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-03-26 21:16:28 +01:00
|
|
|
public void onActivityResultFragment(int requestCode, int resultCode, Intent data) {
|
2013-10-25 17:19:00 +02:00
|
|
|
avatarUpdater.onActivityResult(requestCode, resultCode, data);
|
|
|
|
}
|
|
|
|
|
2014-03-26 21:16:28 +01:00
|
|
|
@Override
|
|
|
|
public void saveSelfArgs(Bundle args) {
|
|
|
|
if (avatarUpdater != null && avatarUpdater.currentPicturePath != null) {
|
|
|
|
args.putString("path", avatarUpdater.currentPicturePath);
|
|
|
|
}
|
|
|
|
if (nameTextView != null) {
|
|
|
|
String text = nameTextView.getText().toString();
|
|
|
|
if (text != null && text.length() != 0) {
|
|
|
|
args.putString("nameTextView", text);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void restoreSelfArgs(Bundle args) {
|
|
|
|
if (avatarUpdater != null) {
|
|
|
|
avatarUpdater.currentPicturePath = args.getString("path");
|
|
|
|
}
|
|
|
|
String text = args.getString("nameTextView");
|
|
|
|
if (text != null) {
|
|
|
|
if (nameTextView != null) {
|
|
|
|
nameTextView.setText(text);
|
|
|
|
} else {
|
|
|
|
nameToSet = text;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-10-25 17:19:00 +02:00
|
|
|
@Override
|
|
|
|
public void didReceivedNotification(int id, final Object... args) {
|
2014-08-22 16:24:33 +02:00
|
|
|
if (id == NotificationCenter.updateInterfaces) {
|
2014-02-04 19:36:55 +01:00
|
|
|
int mask = (Integer)args[0];
|
|
|
|
if ((mask & MessagesController.UPDATE_MASK_AVATAR) != 0 || (mask & MessagesController.UPDATE_MASK_NAME) != 0 || (mask & MessagesController.UPDATE_MASK_STATUS) != 0) {
|
|
|
|
updateVisibleRows(mask);
|
2013-10-25 17:19:00 +02:00
|
|
|
}
|
2014-08-22 16:24:33 +02:00
|
|
|
} else if (id == NotificationCenter.chatDidFailCreate) {
|
2014-03-22 23:31:55 +01:00
|
|
|
if (progressDialog != null) {
|
|
|
|
try {
|
|
|
|
progressDialog.dismiss();
|
|
|
|
} catch (Exception e) {
|
|
|
|
FileLog.e("tmessages", e);
|
|
|
|
}
|
|
|
|
}
|
2013-10-25 17:19:00 +02:00
|
|
|
donePressed = false;
|
2014-08-22 16:24:33 +02:00
|
|
|
} else if (id == NotificationCenter.chatDidCreated) {
|
2014-11-06 22:34:47 +01:00
|
|
|
AndroidUtilities.runOnUIThread(new Runnable() {
|
2013-10-25 17:19:00 +02:00
|
|
|
@Override
|
|
|
|
public void run() {
|
2014-03-22 23:31:55 +01:00
|
|
|
if (progressDialog != null) {
|
|
|
|
try {
|
|
|
|
progressDialog.dismiss();
|
|
|
|
} catch (Exception e) {
|
|
|
|
FileLog.e("tmessages", e);
|
|
|
|
}
|
|
|
|
}
|
2014-06-04 01:31:48 +02:00
|
|
|
Bundle args2 = new Bundle();
|
|
|
|
args2.putInt("chat_id", (Integer)args[0]);
|
2014-06-15 01:23:36 +02:00
|
|
|
presentFragment(new ChatActivity(args2), true);
|
2013-10-25 17:19:00 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-04 19:36:55 +01:00
|
|
|
private void updateVisibleRows(int mask) {
|
|
|
|
if (listView == null) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
int count = listView.getChildCount();
|
|
|
|
for (int a = 0; a < count; a++) {
|
|
|
|
View child = listView.getChildAt(a);
|
2014-11-10 12:05:22 +01:00
|
|
|
if (child instanceof UserCell) {
|
|
|
|
((UserCell) child).update(mask);
|
2014-02-04 19:36:55 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-13 21:10:14 +01:00
|
|
|
private class ListAdapter extends BaseFragmentAdapter {
|
2013-10-25 17:19:00 +02:00
|
|
|
private Context mContext;
|
|
|
|
|
|
|
|
public ListAdapter(Context context) {
|
|
|
|
mContext = context;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean areAllItemsEnabled() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isEnabled(int position) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-11-13 21:10:14 +01:00
|
|
|
public View getView(int i, View view, ViewGroup viewGroup) {
|
|
|
|
TLRPC.User user = MessagesController.getInstance().getUser(selectedContacts.get(i));
|
|
|
|
if (view == null) {
|
|
|
|
view = new UserCell(mContext, 1);
|
2013-12-20 20:25:49 +01:00
|
|
|
}
|
2014-11-13 21:10:14 +01:00
|
|
|
((UserCell) view).setData(user, null, null, 0);
|
|
|
|
return view;
|
2013-10-25 17:19:00 +02:00
|
|
|
|
2014-11-13 21:10:14 +01:00
|
|
|
/*
|
2013-10-25 17:19:00 +02:00
|
|
|
if (convertView == null) {
|
2014-10-21 22:35:16 +02:00
|
|
|
convertView = new SettingsSectionLayout(mContext);
|
2013-10-25 17:19:00 +02:00
|
|
|
convertView.setBackgroundColor(0xffffffff);
|
|
|
|
}
|
2014-10-21 22:35:16 +02:00
|
|
|
((SettingsSectionLayout) convertView).setText(LocaleController.formatPluralString("Members", selectedContacts.size()).toUpperCase());
|
2013-10-25 17:19:00 +02:00
|
|
|
return convertView;
|
2014-11-13 21:10:14 +01:00
|
|
|
*/
|
2013-10-25 17:19:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|