Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow messages to be updated any time #34

Merged
merged 15 commits into from
Apr 19, 2024

Conversation

merlinpaypal
Copy link
Contributor

@merlinpaypal merlinpaypal commented Apr 16, 2024

Description

  • Removed updateInProgress so messages can be updated even when an update is happening
  • Removed messageTextView.visibility = View.GONE so messages stay visible when updating
  • Updates pre-commit script to stop using stash and to just re-add staged files
  • Require integrationName and integrationVersion for setGlobalAnalytics
  • Moved KoverExcludeGenerated to utils package
  • Moved GlobalAnalytics to analytics package
  • Improved API JSON logging a little with pretty printing

Testing instructions

Inside of updateMessageContent, I wrapped getMessageWithHash call as below.

This if-else is necessary so an initial message loads (handler == null) and then it uses the else for future updates.

I also commented out submitButton.isEnabled = false in XmlActivity onLoading.

This lets you update the message as much as you want.

		if (handler == null) {
			requestDuration = measureTimeMillis {
				Api.getMessageWithHash(
					context,
					getConfig(),
					this.instanceId,
					this,
				)
			}.toInt()
		}
		else {
			handler?.postDelayed({
				LogCat.debug(TAG, "Getting the message now")
				requestDuration = measureTimeMillis {
					Api.getMessageWithHash(
						context,
						getConfig(),
						this.instanceId,
						this,
					)
				}.toInt()
			}, 3000)
		}

@merlinpaypal merlinpaypal requested a review from grablack April 16, 2024 18:03
Copy link
Contributor

github-actions bot commented Apr 16, 2024

Code Coverage

File Coverage [100.00%]
library/src/main/java/com/paypal/messages/analytics/GlobalAnalytics.kt 100.00%
library/src/main/java/com/paypal/messages/config/message/PayPalMessageConfig.kt 100.00%
Total Project Coverage 100.00%

Base automatically changed from fix/tracking-format to develop April 19, 2024 20:02
@merlinpaypal merlinpaypal merged commit ef69ce9 into develop Apr 19, 2024
7 checks passed
@merlinpaypal merlinpaypal deleted the fix/message-update-experience branch April 19, 2024 20:10
github-actions bot pushed a commit that referenced this pull request Apr 23, 2024
## [1.0.0-develop.2](1.0.0-develop.1...1.0.0-develop.2) (2024-04-23)

### Features

* remove session id and device id ([#35](#35)) ([20367ca](20367ca))

### Bug Fixes

* allow messages to be updated any time ([#34](#34)) ([ef69ce9](ef69ce9))
* update tracking format ([#33](#33)) ([dc8dd61](dc8dd61))
Copy link
Contributor

🎉 This PR is included in version 1.0.0-develop.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this pull request May 14, 2024
## 1.0.0 (2024-05-14)

### Features

* accessibility ([#31](#31)) ([20644c8](20644c8))
* add instance_id  ([#4](#4)) ([d72ccee](d72ccee))
* base of GitHub workflows ([#5](#5)) ([c32defe](c32defe))
* create a snapshot workflow ([#22](#22)) ([5bc02da](5bc02da))
* debounce config updates ([#24](#24)) ([7d0a043](7d0a043))
* jetpack compose demo ([#10](#10)) ([a47065e](a47065e))
* modal updates ([#28](#28)) ([101ade5](101ade5))
* package pre-release ([#14](#14)) ([d63f834](d63f834))
* page type ([#26](#26)) ([c79e439](c79e439))
* remove session id and device id ([#35](#35)) ([20367ca](20367ca))
* session id and device id ([#30](#30)) ([a7208eb](a7208eb))
* update message view to use its own instance id ([#20](#20)) ([9efb3bb](9efb3bb))
* use nested coroutine to prevent blocking ([#19](#19)) ([b06039c](b06039c))
* xml demo ([#6](#6)) ([4b33504](4b33504))

### Bug Fixes

* allow messages to be updated any time ([#34](#34)) ([ef69ce9](ef69ce9))
* correct urls ([#32](#32)) ([f72ffda](f72ffda))
* general analytics fixes ([#36](#36)) ([ff2ac5a](ff2ac5a))
* modal analytics fixes ([#37](#37)) ([c95246f](c95246f))
* remove kotlinter ([1550f44](1550f44))
* update shared data ([#7](#7)) ([2fa1ea1](2fa1ea1))
* update tracking format ([#33](#33)) ([dc8dd61](dc8dd61))

### Code Refactoring

* adjust logo alignment ([#23](#23)) ([6347be3](6347be3))
* clone to prevent shallow copy ([#25](#25)) ([acfc3ff](acfc3ff))
* prevent destroying modal on close ([#3](#3)) ([ae7e032](ae7e032))
* prevent empty values ([#29](#29)) ([b7b746f](b7b746f))
* radio offer type and other things ([#11](#11)) ([960a48a](960a48a))
* route changes ([#13](#13)) ([6434e30](6434e30))
* use dot getters and setters ([#9](#9)) ([84316bb](84316bb))

### Continuous Integration

* change os ([#38](#38)) ([f7da086](f7da086))
* functional tests ([#16](#16)) ([51d9ec6](51d9ec6))
* lint and test ([#8](#8)) ([8a22f0b](8a22f0b))
* update semantic release ([#21](#21)) ([a9a3fb8](a9a3fb8))
Copy link
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants