Skip to content

Commit d2dca12

Browse files
Android UI Kit v2.3.1-1
1 parent 1fa5e43 commit d2dca12

File tree

29 files changed

+1853
-50
lines changed

29 files changed

+1853
-50
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
![GitHub repo size](https://img.shields.io/github/repo-size/cometchat-pro/android-java-chat-app)
1414
![GitHub contributors](https://img.shields.io/github/contributors/cometchat-pro/android-java-chat-app)
1515
![GitHub stars](https://img.shields.io/github/stars/cometchat-pro/android-java-chat-app?style=social)
16-
![Version](https://shields.io/badge/version-v2.1.1--1-orange)
16+
![Version](https://shields.io/badge/version-v2.3.1--1-orange)
1717
![Twitter Follow](https://img.shields.io/twitter/follow/cometchat?style=social)
1818

1919
<img src="https://files.readme.io/952af91-UI_Kit__1.png"/>

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ dependencies {
7676
implementation 'com.facebook.shimmer:shimmer:0.4.0'
7777

7878
//
79-
implementation 'com.cometchat:pro-android-chat-sdk:2.3.0'
79+
implementation 'com.cometchat:pro-android-chat-sdk:2.3.1'
8080
}

app/release/output.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ allprojects {
2020
jcenter()
2121

2222
maven {
23-
url "https://dl.bintray.com/cometchat/pro"
23+
url "https://dl.cloudsmith.io/public/cometchat/cometchat-pro-android/maven/"
2424
}
2525

2626
}

uikit/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ dependencies {
9090
implementation 'com.google.android.gms:play-services-location:17.0.0'
9191
implementation 'com.google.android.gms:play-services-maps:17.0.0'
9292
//cometchat
93-
compileOnly 'com.cometchat:pro-android-chat-sdk:2.3.0'
93+
compileOnly 'com.cometchat:pro-android-chat-sdk:2.3.1'
9494

9595
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0'
9696
}

uikit/src/main/java/com/cometchat/pro/uikit/ui_components/calls/call_manager/CometChatStartCallActivity.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.cometchat.pro.core.CometChat;
2727
import com.cometchat.pro.exceptions.CometChatException;
2828
import com.cometchat.pro.models.User;
29+
import com.cometchat.pro.rtc.model.AudioMode;
2930
import com.cometchat.pro.uikit.R;
3031
import com.cometchat.pro.uikit.ui_components.calls.call_manager.ongoing_call.OngoingCallService;
3132
import com.cometchat.pro.uikit.ui_components.shared.CometChatSnackBar;
@@ -73,7 +74,7 @@ protected void onCreate(Bundle savedInstanceState) {
7374
ongoingCallService = new OngoingCallService();
7475
mServiceIntent = new Intent(this,ongoingCallService.getClass());
7576
if (!isMyServiceRunning(ongoingCallService.getClass())) {
76-
startForegroundService(mServiceIntent);
77+
startService(mServiceIntent);
7778
}
7879

7980
mainView = findViewById(R.id.call_view);
@@ -91,11 +92,17 @@ protected void onCreate(Bundle savedInstanceState) {
9192
.build();
9293
Log.e( "startCallActivity: ",sessionID+" "+type);
9394
CometChat.startCall(callSettings, new CometChat.OngoingCallListener() {
95+
9496
@Override
9597
public void onUserListUpdated(List<User> list) {
9698
Log.e( "onUserListUpdated: ",list.toString() );
9799
}
98100

101+
@Override
102+
public void onAudioModesUpdated(List<AudioMode> list) {
103+
Log.e( "onAudioModeUpdated: ",list.toString() );
104+
}
105+
99106
@Override
100107
public void onUserJoined(User user) {
101108
connectingLayout.setVisibility(View.GONE);
@@ -122,17 +129,15 @@ mainView, getString(R.string.user_left)+":"+ user.getName(),
122129

123130
@Override
124131
public void onError(CometChatException e) {
125-
if (mServiceIntent!=null)
126-
stopService(mServiceIntent);
132+
stopService(mServiceIntent);
127133
Log.e("onstartcallError: ", e.getMessage());
128134
CometChatSnackBar.show(CometChatStartCallActivity.this,
129135
mainView,CometChatError.localized(e), CometChatSnackBar.ERROR);
130136
}
131137

132138
@Override
133139
public void onCallEnded(Call call) {
134-
if (mServiceIntent!=null)
135-
stopService(mServiceIntent);
140+
stopService(mServiceIntent);
136141
Log.e("TAG", "onCallEnded: ");
137142
finish();
138143
}

uikit/src/main/java/com/cometchat/pro/uikit/ui_components/calls/call_manager/ongoing_call/OngoingCallService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private void startMyOwnForeground() {
6363
.setContentIntent(pendingIntent)
6464
.setCategory(Notification.CATEGORY_CALL)
6565
.build();
66-
startForeground(1,notification);
66+
notificationManager.notify(1,notification);
6767
}
6868

6969
private Intent getCallIntent(String title) {
@@ -104,7 +104,7 @@ public void onDestroy() {
104104
@Override
105105
public boolean stopService(Intent name) {
106106
stopTimer();
107-
return stopService(name);
107+
return super.stopService(name);
108108
}
109109

110110
private Timer timer;

uikit/src/main/java/com/cometchat/pro/uikit/ui_components/groups/group_list/CometChatGroupList.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import androidx.annotation.Nullable;
1111
import androidx.fragment.app.Fragment;
1212
import androidx.recyclerview.widget.RecyclerView;
13+
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
1314

1415
import android.text.Editable;
1516
import android.text.TextWatcher;
@@ -76,6 +77,8 @@ public class CometChatGroupList extends Fragment {
7677

7778
private LinearLayout noGroupLayout;
7879

80+
private SwipeRefreshLayout swipeRefreshLayout;
81+
7982
private List<Group> groupList = new ArrayList<>();
8083

8184
private static final String TAG = "CometChatGroupList";
@@ -95,6 +98,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
9598
noGroupLayout = view.findViewById(R.id.no_group_layout);
9699
etSearch = view.findViewById(R.id.search_bar);
97100
clearSearch = view.findViewById(R.id.clear_search);
101+
swipeRefreshLayout = view.findViewById(R.id.swipeToRefresh);
98102

99103
ivCreateGroup = view.findViewById(R.id.create_group);
100104
ivCreateGroup.setImageTintList(ColorStateList.valueOf(Color.parseColor(UISettings.getColor())));
@@ -183,6 +187,14 @@ public void OnItemClick(Group group, int position) {
183187
event.OnItemClick(group,position);
184188
}
185189
});
190+
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
191+
@Override
192+
public void onRefresh() {
193+
groupsRequest=null;
194+
rvGroupList.clear();
195+
fetchGroup();
196+
}
197+
});
186198
return view;
187199
}
188200

@@ -215,6 +227,8 @@ public void onSuccess(List<Group> groups) {
215227
noGroupLayout.setVisibility(View.GONE);
216228
rvGroupList.setVisibility(View.VISIBLE);
217229
}
230+
if (swipeRefreshLayout.isRefreshing())
231+
swipeRefreshLayout.setRefreshing(false);
218232
}
219233
@Override
220234
public void onError(CometChatException e) {

uikit/src/main/java/com/cometchat/pro/uikit/ui_components/messages/message_list/CometChatMessageList.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,8 +2173,8 @@ public void onResume() {
21732173
checkOnGoingCall();
21742174
if (!(resultIntentCode== UIKitConstants.RequestCode.GALLERY ||
21752175
resultIntentCode== UIKitConstants.RequestCode.CAMERA ||
2176-
resultIntentCode == UIKitConstants.RequestCode.FILE) ||
2177-
resultIntentCode == UIKitConstants.RequestCode.AUDIO) {
2176+
resultIntentCode == UIKitConstants.RequestCode.FILE ||
2177+
resultIntentCode == UIKitConstants.RequestCode.AUDIO)) {
21782178
rvChatListView.removeItemDecoration(stickyHeaderDecoration);
21792179
messagesRequest = null;
21802180
messageAdapter = null;

uikit/src/main/java/com/cometchat/pro/uikit/ui_components/shared/cometchatConversations/CometChatConversationsAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ protected FilterResults performFiltering(CharSequence charSequence) {
359359
conversation.getLastMessage().getCategory().equals(CometChatConstants.CATEGORY_MESSAGE) &&
360360
conversation.getLastMessage().getType().equals(CometChatConstants.MESSAGE_TYPE_TEXT)
361361
&& ((TextMessage)conversation.getLastMessage()).getText()!=null
362-
&& ((TextMessage)conversation.getLastMessage()).getText().contains(searchKeyword)) {
362+
&& ((TextMessage)conversation.getLastMessage()).getText().toLowerCase().contains(searchKeyword.toLowerCase())) {
363363
tempFilter.add(conversation);
364364
}
365365
}

0 commit comments

Comments
 (0)