Skip to content

Commit

Permalink
Merge pull request #363 from apptentive/patch
Browse files Browse the repository at this point in the history
Patch release 3.1.2
  • Loading branch information
barry-li authored Jun 24, 2016
2 parents 07ea2de + 0dffcc4 commit b1bf425
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2016-06-24 - 3.1.2

#### Bugs Fixed

* Fix Message Center composing bar exception thrown when the animation was in play after the fragment was detached

# 2016-06-20 - 3.1.1

#### Improvements
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use your app, to talk to them at the right time, and in the right way.

##### Version history is tracked [here](CHANGELOG.md)

##### Binary releases are hosted for Maven [here](http://search.maven.org/#artifactdetails|com.apptentive|apptentive-android|3.1.1|aar)
##### Binary releases are hosted for Maven [here](http://search.maven.org/#artifactdetails|com.apptentive|apptentive-android|3.1.2|aar)
#### Reporting Bugs

We encourage you to help us find and fix bugs. If you find a bug, please fill in the contributor agreement, then open a [github issue](https://github.com/apptentive/apptentive-android/issues?direction=desc&sort=created&state=open).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,9 @@ public void addNewOutGoingMessageItem(ApptentiveMessage message) {
unsendMessagesCount++;

isPaused = false;
messageCenterListAdapter.setPaused(isPaused);
if (messageCenterListAdapter != null) {
messageCenterListAdapter.setPaused(isPaused);
}
}

public void displayNewIncomingMessageItem(ApptentiveMessage message) {
Expand Down Expand Up @@ -771,7 +773,9 @@ public void restoreSavedAttachmentsToComposer(final List<ImageItem> images) {
messageCenterListAdapter.setForceShowKeyboard(false);
}
int firstIndex = messageCenterListView.getFirstVisiblePosition();
messageCenterListAdapter.notifyDataSetChanged();
if (messageCenterListAdapter != null) {
messageCenterListAdapter.notifyDataSetChanged();
}
messagingActionHandler.sendMessage(messagingActionHandler.obtainMessage(MSG_SCROLL_FROM_TOP,
firstIndex, top));
updateComposingBar();
Expand Down Expand Up @@ -892,7 +896,7 @@ public void clearComposingUi(Animator.AnimatorListener al,

@Override
public void updateComposingBar() {
if (!isDetached()) {
if (messageCenterListAdapter != null) {
MessageCenterComposingActionBarView barView = messageCenterListAdapter.getComposingActionBarView();
if (barView != null) {
barView.showConfirmation = true;
Expand Down Expand Up @@ -1574,8 +1578,11 @@ public MessagingActionHandler(MessageCenterFragment fragment) {

public void handleMessage(Message msg) {
MessageCenterFragment fragment = (MessageCenterFragment) messageCenterFragmentWeakReference.get();
if (fragment == null || fragment.isDetached()) {
// Message can be delayed. If so, make sure fragment is still available or still attached to activity
/* Message can be delayed. If so, make sure fragment is still available and attached to activity
* messageCenterListAdapter will always be set null in onDetach(). it's a good indication if
* fragment is attached.
*/
if (fragment == null || fragment.messageCenterListAdapter == null) {
return;
}
switch (msg.what) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
public class Constants {

public static final String APPTENTIVE_SDK_VERSION = "3.1.1";
public static final String APPTENTIVE_SDK_VERSION = "3.1.2";


public static final int REQUEST_CODE_PHOTO_FROM_SYSTEM_PICKER = 10;
Expand Down

0 comments on commit b1bf425

Please sign in to comment.