Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
russellcullen committed Aug 22, 2023
1 parent c6f7ea9 commit 57f99cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class LocationFragment : Fragment(), LocationListener {
if (isNewYork || locationMock != null) {
locationMock?.let { location ->
activityModel.userLocationAddress =
geocoder.getFromLocation(location.latitude, location.longitude, 1)[0]
geocoder.getFromLocation(location.latitude, location.longitude, 1)?.get(0)
}

logger.debug("User navigated to the next screen")
Expand Down Expand Up @@ -230,7 +230,7 @@ class LocationFragment : Fragment(), LocationListener {

try {
if (location != null) {
address = geocoder.getFromLocation(location.latitude, location.longitude, maxResults)[0]
address = geocoder.getFromLocation(location.latitude, location.longitude, maxResults)!![0]
logger.debug("Region is: ${address.adminArea} ${address.countryCode} ")
binding.regionEt.setText("${address.adminArea} ${address.countryCode}", TextView.BufferType.EDITABLE)

Expand Down Expand Up @@ -292,7 +292,7 @@ class LocationFragment : Fragment(), LocationListener {
val address: Address?

try {
address = geocoder.getFromLocation(location.latitude, location.longitude, maxResults)[0]
address = geocoder.getFromLocation(location.latitude, location.longitude, maxResults)!![0]
logger.debug("Region is: ${address.adminArea} ${address.countryCode} ")
binding.regionEt.setText("${address.adminArea} ${address.countryCode}", TextView.BufferType.EDITABLE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ class AccountListRegistryFragment : Fragment(R.layout.account_list_registry) {
})

search.setOnActionExpandListener(object : OnActionExpandListener {
override fun onMenuItemActionExpand(item: MenuItem?): Boolean {
override fun onMenuItemActionExpand(item: MenuItem): Boolean {
// Do nothing
return true
}

override fun onMenuItemActionCollapse(item: MenuItem?): Boolean {
override fun onMenuItemActionCollapse(item: MenuItem): Boolean {
this@AccountListRegistryFragment.accountListAdapter.resetFilter()
return true
}
Expand Down

0 comments on commit 57f99cb

Please sign in to comment.