Commit 8e5eb158 authored by sheteng's avatar sheteng

语音房间 禁言1

parent 9aa23093
......@@ -79,7 +79,6 @@ dependencies {
def room_version = "2.3.0"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
implementation 'com.guolindev.permissionx:permissionx:1.6.4'
......
......@@ -26,7 +26,7 @@
android:name=".MainActivity2"
android:exported="true"
android:label="@string/title_activity_main2"
android:screenOrientation="fullSensor" >
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -36,7 +36,7 @@
<activity
android:name=".ui.login.LoginActivity"
android:label="@string/app_name"
android:screenOrientation="fullSensor" android:theme="@style/Theme.CcwangluoIm.NoActionBar">
android:screenOrientation="portrait" android:theme="@style/Theme.CcwangluoIm.NoActionBar">
</activity>
</application>
......
......@@ -18,6 +18,7 @@ import com.ccwangluo.im.util.ToastUtil;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
public class LoginViewModel extends ViewModel {
......@@ -29,7 +30,7 @@ public class LoginViewModel extends ViewModel {
public MutableLiveData<MessageContent> privateMsgList = new MutableLiveData<>();
public MutableLiveData<MessageContent> channelMsgList = new MutableLiveData<>();
public MutableLiveData<List<Long>> channelList = new MutableLiveData<>();
public MutableLiveData<HashSet<Long>> channelList = new MutableLiveData<>();
public void login(Context context, String appKey, String appsecret, String username, String userId,String server, String ip, int port) {
Long id = Long.parseLong(userId);
......@@ -74,9 +75,9 @@ public class LoginViewModel extends ViewModel {
}
public void addChannelId(long id) {
List<Long> value = channelList.getValue();
HashSet<Long> value = channelList.getValue();
if (value == null) {
value = new ArrayList<>();
value = new HashSet<>();
}
value.add(id);
channelList.postValue(value);
......@@ -84,7 +85,7 @@ public class LoginViewModel extends ViewModel {
}
public void removeChannelId(long id) {
List<Long> value = channelList.getValue();
HashSet<Long> value = channelList.getValue();
if (value == null) {
return;
}
......
......@@ -36,6 +36,7 @@ import com.ccwangluo.im.ui.login.TestActivity;
import com.ccwangluo.im.util.ToastUtil;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
public class NotificationsFragment extends Fragment {
......@@ -73,9 +74,9 @@ public class NotificationsFragment extends Fragment {
binding.channelList.setAdapter(channelAdapter);
loginViewModel.channelList.observe(getViewLifecycleOwner(), new Observer<List<Long>>() {
loginViewModel.channelList.observe(getViewLifecycleOwner(), new Observer<HashSet<Long>>() {
@Override
public void onChanged(List<Long> longs) {
public void onChanged(HashSet<Long> longs) {
list.clear();
list.addAll(longs);
channelAdapter.notifyDataSetChanged();
......
......@@ -27,7 +27,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="UserId"
android:text="20"
android:text="5"
android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionDone"
android:selectAllOnFocus="true"
......@@ -69,7 +69,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="ip"
android:text="10.17.4.207"
android:text="106.15.237.67"
android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionDone"
android:selectAllOnFocus="true"
......
......@@ -21,6 +21,7 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
......@@ -41,6 +42,14 @@ android {
}
android.libraryVariants.all { variant ->
variant.outputs.all {
def date = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08"))
outputFileName = "ccim_${date}.aar"
}
}
protobuf {
//配置protoc编译器
protoc {
......@@ -64,9 +73,11 @@ repositories {
dirs 'libs'
}
}
dependencies {
compileOnly(name: 'janus-release', ext: 'aar')
implementation 'androidx.appcompat:appcompat:1.3.1'
// implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.protobuf:protobuf-java:3.13.0'
implementation 'com.google.protobuf:protobuf-java-util:3.12.0'
implementation 'com.google.code.gson:gson:2.8.7'
......
......@@ -139,42 +139,6 @@ public class CCIMClient {
});
initCachePath(context);
registerMessageListener(new OnPushMsgListener() {
@Override
public void pushPrivateMsg(MessageContent msg) {
}
@Override
public void pushChannelMsg(MessageContent msg) {
}
@Override
public void pushNewContact(Contact contact) {
}
@Override
public void pushDeleteContact(Long contactId) {
}
@Override
public void pushContactNetStatus(Long contactId, NetStatus status) {
}
@Override
public void pushContactNewReq(User user) {
}
@Override
public void pushUserMutedRes(Long mutedExpiredAt) {
}
});
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment