mirror of
https://github.com/ChronosX88/Influence.git
synced 2024-12-26 16:31:45 +00:00
Added letter icon in avatar if user has no avatar
This commit is contained in:
parent
6f844cb924
commit
8a062745d9
@ -65,6 +65,7 @@ dependencies {
|
||||
implementation 'net.sourceforge.streamsupport:streamsupport:1.7.0'
|
||||
implementation 'org.greenrobot:eventbus:3.1.1'
|
||||
implementation 'net.sourceforge.streamsupport:android-retrofuture:1.7.0'
|
||||
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@ -23,6 +23,8 @@ import android.graphics.BitmapFactory;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
|
||||
import com.stfalcon.chatkit.dialogs.DialogsListAdapter;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@ -52,7 +54,12 @@ public class DialogListPresenter implements CoreContracts.IDialogListPresenterCo
|
||||
private CoreContracts.IChatListViewContract view;
|
||||
private CoreContracts.IDialogListLogicContract logic;
|
||||
private DialogsListAdapter<GenericDialog> dialogListAdapter = new DialogsListAdapter<>((imageView, url, payload) -> {
|
||||
imageView.setImageResource(R.mipmap.ic_launcher);
|
||||
imageView.setImageDrawable(TextDrawable.builder()
|
||||
.beginConfig()
|
||||
.width(32)
|
||||
.height(32)
|
||||
.endConfig()
|
||||
.buildRound(Character.toString(url.charAt(0)), ColorGenerator.MATERIAL.getColor(Character.toString(url.charAt(0)))));
|
||||
CompletableFuture.supplyAsync(() -> {
|
||||
while (AppHelper.getXmppConnection() == null);
|
||||
while (AppHelper.getXmppConnection().isConnectionAlive() != true);
|
||||
|
@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
jcenter()
|
||||
maven {
|
||||
url "http://tomp2p.net/dev/mvn/"
|
||||
url 'http://dl.bintray.com/amulyakhare/maven'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
|
Loading…
Reference in New Issue
Block a user