Fix error status bar and progress bar in chat room
This commit is contained in:
parent
7d7b7b7139
commit
c054e6bcf8
3 changed files with 13 additions and 7 deletions
|
@ -66,7 +66,6 @@ import android.text.Editable;
|
|||
import android.text.InputType;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
@ -467,6 +466,10 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
|
||||
onSaveInstanceState(getArguments());
|
||||
|
||||
uploadLayout.setVisibility(View.GONE);
|
||||
textLayout.setVisibility(View.VISIBLE);
|
||||
progressBar.setProgress(0);
|
||||
|
||||
//Hide keybord
|
||||
InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(message.getWindowToken(), 0);
|
||||
|
@ -519,7 +522,6 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
|
||||
remoteComposing.setVisibility(chatRoom.isRemoteComposing() ? View.VISIBLE : View.GONE);
|
||||
dispayMessageList();
|
||||
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
|
||||
@Override
|
||||
public void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, LinphoneChatMessage.State state) {
|
||||
if (state == LinphoneChatMessage.State.FileTransferDone) {
|
||||
if (state == LinphoneChatMessage.State.FileTransferDone || state == LinphoneChatMessage.State.FileTransferError) {
|
||||
if(msg.isOutgoing() && mUploadingImageStream != null){
|
||||
mUploadPendingFileMessage = null;
|
||||
mUploadingImageStream = null;
|
||||
|
|
|
@ -119,7 +119,11 @@ public class StatusFragment extends Fragment {
|
|||
if (!isAttached || !LinphoneService.isReady()) {
|
||||
return;
|
||||
}
|
||||
if (lc.getDefaultProxyConfig().equals(proxy)) {
|
||||
|
||||
if (lc.getDefaultProxyConfig() != null && lc.getDefaultProxyConfig().equals(proxy)) {
|
||||
statusLed.setImageResource(getStatusIconResource(state, true));
|
||||
statusText.setText(getStatusIconText(state));
|
||||
} else if(lc.getDefaultProxyConfig() == null) {
|
||||
statusLed.setImageResource(getStatusIconResource(state, true));
|
||||
statusText.setText(getStatusIconText(state));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue