Skip to content

Commit

Permalink
release v1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuzhao committed Feb 10, 2017
1 parent 5d84df8 commit 3d6e128
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 32 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {

ndk {
//选择要添加的对应cpu类型的.so库
abiFilters 'armeabi','arm64-v8a','x86'
//还可以添加 'armeabi-v7a', 'x86'
abiFilters 'armeabi-v7a','arm64-v8a','x86'
//还可以添加 'armeabi', 'x86'
}
}
buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion kefu-easeui/kefu-easeui.iml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="kefu-sdk_1.0.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
<orderEntry type="library" exported="" name="glide-3.7.0" level="project" />
<orderEntry type="library" exported="" name="kefu-sdk_1.0.4" level="project" />
<orderEntry type="library" exported="" name="org.apache.http.legacy-android-23" level="project" />
</component>
</module>
Binary file modified kefu-easeui/libs/arm64-v8a/libhyphenate.so
Binary file not shown.
Binary file modified kefu-easeui/libs/armeabi-v7a/libhyphenate.so
Binary file not shown.
Binary file modified kefu-easeui/libs/armeabi/libhyphenate.so
Binary file not shown.
Binary file not shown.
Binary file modified kefu-easeui/libs/x86/libhyphenate.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void cancelNotificaton() {
* @param message
*/
public synchronized void onNewMsg(Message message) {
if(ChatClient.getInstance().getChat().isSilentMessage(message)){
if(ChatClient.getInstance().chatManager().isSilentMessage(message)){
return;
}
UIProvider.SettingsProvider settingsProvider = UIProvider.getInstance().getSettingsProvider();
Expand All @@ -135,7 +135,7 @@ public synchronized void onNewMsg(Message message) {
}

public synchronized void onNewMesg(List<Message> messages) {
if(ChatClient.getInstance().getChat().isSilentMessage(messages.get(messages.size()-1))){
if(ChatClient.getInstance().chatManager().isSilentMessage(messages.get(messages.size()-1))){
return;
}
UIProvider.SettingsProvider settingsProvider = UIProvider.getInstance().getSettingsProvider();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public class MessageAdapter extends BaseAdapter {
private Drawable myBubbleBg;
private Drawable otherBuddleBg;
public View animView;
public View currentPlayView;
private ListView listView;
public int mMinItemWidth;
public int mMaxItemWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,26 +132,6 @@ private void setUpBaseView() {
}


// if (deliveredView != null) {
// if (message.isDelivered()) {
// deliveredView.setVisibility(View.VISIBLE);
// } else {
// deliveredView.setVisibility(View.INVISIBLE);
// }
// }
//
// if (ackedView != null) {
// if (message.isAcked()) {
// if (deliveredView != null) {
// deliveredView.setVisibility(View.INVISIBLE);
// }
// ackedView.setVisibility(View.VISIBLE);
// } else {
// ackedView.setVisibility(View.INVISIBLE);
// }
// }


if (adapter instanceof MessageAdapter) {
if (userAvatarView != null){
if (((MessageAdapter) adapter).isShowAvatar()){
Expand Down Expand Up @@ -204,8 +184,9 @@ public void onProgress(final int progress, String status) {
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (percentageView != null)
percentageView.setText(progress + "%");
if (percentageView != null && progress < 100){
percentageView.setText(progress + "%");
}

}
});
Expand Down Expand Up @@ -236,7 +217,7 @@ public void onError(int i, String s) {
public void onProgress(final int progress, String s) {
activity.runOnUiThread(new Runnable() {
public void run() {
if (percentageView != null) {
if (percentageView != null && progress < 100) {
percentageView.setText(progress + "%");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected void handleSendMessage() {
progressBar.setVisibility(View.VISIBLE);
if(percentageView != null){
percentageView.setVisibility(View.VISIBLE);
percentageView.setText(message.getProgress() + "%");
percentageView.setText("");
}
statusView.setVisibility(View.INVISIBLE);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void onClick(View v) {
Message sendMessage = Message.createTxtSendMessage(content, message.getFrom());
//存在上下文的机器人菜单消息
sendMessage.addContent(ContentFactory.createRobotMenuIdInfo(null).setMenuId(menuId));
ChatClient.getInstance().getChat().sendMessage(sendMessage);
ChatClient.getInstance().chatManager().sendMessage(sendMessage);
}
});
LinearLayout.LayoutParams llLp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected void onBubbleClick() {

@Override
protected Void doInBackground(Void... params) {
ChatClient.getInstance().getChat().downloadAttachment(message);
ChatClient.getInstance().chatManager().downloadAttachment(message);
return null;
}

Expand All @@ -131,6 +131,8 @@ protected void onPostExecute(Void result) {


private void playVoice(View v, String localPath, final boolean isSend){


//播放动画
if (((MessageAdapter)adapter).animView != null){
boolean preIsSend = (boolean) ((MessageAdapter)adapter).animView.getTag();
Expand All @@ -141,6 +143,13 @@ private void playVoice(View v, String localPath, final boolean isSend){
}
((MessageAdapter)adapter).animView = null;
}
if (((MessageAdapter)adapter).currentPlayView != null && ((MessageAdapter)adapter).currentPlayView == v){
MediaManager.release();
((MessageAdapter)adapter).currentPlayView = null;
return;
}

((MessageAdapter)adapter).currentPlayView = v;
((MessageAdapter)adapter).animView = v.findViewById(R.id.id_recorder_anim);
((MessageAdapter)adapter).animView.setTag(isSend);
if (isSend){
Expand All @@ -150,7 +159,7 @@ private void playVoice(View v, String localPath, final boolean isSend){
if (!message.isListened()){
readStatusView.setVisibility(View.GONE);
message.setListened(true);
ChatClient.getInstance().getChat().setMessageListened(message);
ChatClient.getInstance().chatManager().setMessageListened(message);
}
}

Expand All @@ -161,6 +170,7 @@ private void playVoice(View v, String localPath, final boolean isSend){
MediaManager.playSound(getContext(), localPath, new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
((MessageAdapter)adapter).currentPlayView = null;
if (isSend){
((MessageAdapter)adapter).animView.setBackgroundResource(R.drawable.ease_chatto_voice_playing);
}else{
Expand Down
Binary file modified kefu-easeui/src/main/res/drawable-xhdpi/ease_chat_file_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified kefu-easeui/src/main/res/drawable-xhdpi/ease_chat_file_pressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3d6e128

Please sign in to comment.