Commit 8e5eb158 authored by sheteng's avatar sheteng

语音房间 禁言1

parent 9aa23093
...@@ -79,7 +79,6 @@ dependencies { ...@@ -79,7 +79,6 @@ dependencies {
def room_version = "2.3.0" def room_version = "2.3.0"
implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version"
implementation 'com.guolindev.permissionx:permissionx:1.6.4'
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
android:name=".MainActivity2" android:name=".MainActivity2"
android:exported="true" android:exported="true"
android:label="@string/title_activity_main2" android:label="@string/title_activity_main2"
android:screenOrientation="fullSensor" > android:screenOrientation="portrait" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<activity <activity
android:name=".ui.login.LoginActivity" android:name=".ui.login.LoginActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="fullSensor" android:theme="@style/Theme.CcwangluoIm.NoActionBar"> android:screenOrientation="portrait" android:theme="@style/Theme.CcwangluoIm.NoActionBar">
</activity> </activity>
</application> </application>
......
...@@ -18,6 +18,7 @@ import com.ccwangluo.im.util.ToastUtil; ...@@ -18,6 +18,7 @@ import com.ccwangluo.im.util.ToastUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet;
import java.util.List; import java.util.List;
public class LoginViewModel extends ViewModel { public class LoginViewModel extends ViewModel {
...@@ -29,7 +30,7 @@ public class LoginViewModel extends ViewModel { ...@@ -29,7 +30,7 @@ public class LoginViewModel extends ViewModel {
public MutableLiveData<MessageContent> privateMsgList = new MutableLiveData<>(); public MutableLiveData<MessageContent> privateMsgList = new MutableLiveData<>();
public MutableLiveData<MessageContent> channelMsgList = 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) { public void login(Context context, String appKey, String appsecret, String username, String userId,String server, String ip, int port) {
Long id = Long.parseLong(userId); Long id = Long.parseLong(userId);
...@@ -74,9 +75,9 @@ public class LoginViewModel extends ViewModel { ...@@ -74,9 +75,9 @@ public class LoginViewModel extends ViewModel {
} }
public void addChannelId(long id) { public void addChannelId(long id) {
List<Long> value = channelList.getValue(); HashSet<Long> value = channelList.getValue();
if (value == null) { if (value == null) {
value = new ArrayList<>(); value = new HashSet<>();
} }
value.add(id); value.add(id);
channelList.postValue(value); channelList.postValue(value);
...@@ -84,7 +85,7 @@ public class LoginViewModel extends ViewModel { ...@@ -84,7 +85,7 @@ public class LoginViewModel extends ViewModel {
} }
public void removeChannelId(long id) { public void removeChannelId(long id) {
List<Long> value = channelList.getValue(); HashSet<Long> value = channelList.getValue();
if (value == null) { if (value == null) {
return; return;
} }
......
...@@ -36,6 +36,7 @@ import com.ccwangluo.im.ui.login.TestActivity; ...@@ -36,6 +36,7 @@ import com.ccwangluo.im.ui.login.TestActivity;
import com.ccwangluo.im.util.ToastUtil; import com.ccwangluo.im.util.ToastUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.List; import java.util.List;
public class NotificationsFragment extends Fragment { public class NotificationsFragment extends Fragment {
...@@ -73,9 +74,9 @@ public class NotificationsFragment extends Fragment { ...@@ -73,9 +74,9 @@ public class NotificationsFragment extends Fragment {
binding.channelList.setAdapter(channelAdapter); binding.channelList.setAdapter(channelAdapter);
loginViewModel.channelList.observe(getViewLifecycleOwner(), new Observer<List<Long>>() { loginViewModel.channelList.observe(getViewLifecycleOwner(), new Observer<HashSet<Long>>() {
@Override @Override
public void onChanged(List<Long> longs) { public void onChanged(HashSet<Long> longs) {
list.clear(); list.clear();
list.addAll(longs); list.addAll(longs);
channelAdapter.notifyDataSetChanged(); channelAdapter.notifyDataSetChanged();
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:hint="UserId" android:hint="UserId"
android:text="20" android:text="5"
android:imeActionLabel="@string/action_sign_in_short" android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:hint="ip" android:hint="ip"
android:text="10.17.4.207" android:text="106.15.237.67"
android:imeActionLabel="@string/action_sign_in_short" android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
......
...@@ -21,6 +21,7 @@ android { ...@@ -21,6 +21,7 @@ android {
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }
compileOptions { compileOptions {
...@@ -41,6 +42,14 @@ android { ...@@ -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 { protobuf {
//配置protoc编译器 //配置protoc编译器
protoc { protoc {
...@@ -64,9 +73,11 @@ repositories { ...@@ -64,9 +73,11 @@ repositories {
dirs 'libs' dirs 'libs'
} }
} }
dependencies { dependencies {
compileOnly(name: 'janus-release', ext: 'aar') 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:3.13.0'
implementation 'com.google.protobuf:protobuf-java-util:3.12.0' implementation 'com.google.protobuf:protobuf-java-util:3.12.0'
implementation 'com.google.code.gson:gson:2.8.7' implementation 'com.google.code.gson:gson:2.8.7'
......
...@@ -139,42 +139,6 @@ public class CCIMClient { ...@@ -139,42 +139,6 @@ public class CCIMClient {
}); });
initCachePath(context); 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