mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
reformat code for ktlint compliance
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
f899ee1d2f
commit
01a552b8d3
@ -208,9 +208,12 @@ class IncomingLocationMessageViewHolder(incomingView: View) : MessageHolders
|
|||||||
}
|
}
|
||||||
|
|
||||||
val urlStringBuffer = StringBuffer("file:///android_asset/leafletMapMessagePreview.html")
|
val urlStringBuffer = StringBuffer("file:///android_asset/leafletMapMessagePreview.html")
|
||||||
urlStringBuffer.append("?mapProviderUrl=" + URLEncoder.encode(context!!.getString(R.string.osm_tile_server_url)))
|
urlStringBuffer.append(
|
||||||
urlStringBuffer.append("&mapProviderAttribution=" + URLEncoder.encode(context!!.getString(R.string
|
"?mapProviderUrl=" + URLEncoder.encode(context!!.getString(R.string.osm_tile_server_url))
|
||||||
.osm_tile_server_attributation)))
|
)
|
||||||
|
urlStringBuffer.append(
|
||||||
|
"&mapProviderAttribution=" + URLEncoder.encode(context!!.getString(R.string.osm_tile_server_attributation))
|
||||||
|
)
|
||||||
urlStringBuffer.append("&locationLat=" + URLEncoder.encode(locationLat))
|
urlStringBuffer.append("&locationLat=" + URLEncoder.encode(locationLat))
|
||||||
urlStringBuffer.append("&locationLon=" + URLEncoder.encode(locationLon))
|
urlStringBuffer.append("&locationLon=" + URLEncoder.encode(locationLon))
|
||||||
urlStringBuffer.append("&locationName=" + URLEncoder.encode(locationName))
|
urlStringBuffer.append("&locationName=" + URLEncoder.encode(locationName))
|
||||||
|
@ -813,7 +813,7 @@ class ChatController(args: Bundle) :
|
|||||||
Log.d(TAG, "showShareLocationScreen")
|
Log.d(TAG, "showShareLocationScreen")
|
||||||
|
|
||||||
val bundle = Bundle()
|
val bundle = Bundle()
|
||||||
bundle.putString(BundleKeys.KEY_ROOM_TOKEN,roomToken)
|
bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomToken)
|
||||||
router.pushController(
|
router.pushController(
|
||||||
RouterTransaction.with(LocationPickerController(bundle))
|
RouterTransaction.with(LocationPickerController(bundle))
|
||||||
.pushChangeHandler(HorizontalChangeHandler())
|
.pushChangeHandler(HorizontalChangeHandler())
|
||||||
|
@ -24,7 +24,6 @@ import android.Manifest
|
|||||||
import android.app.SearchManager
|
import android.app.SearchManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.graphics.drawable.ColorDrawable
|
|
||||||
import android.location.Location
|
import android.location.Location
|
||||||
import android.location.LocationListener
|
import android.location.LocationListener
|
||||||
import android.location.LocationManager
|
import android.location.LocationManager
|
||||||
@ -64,7 +63,6 @@ import io.reactivex.Observer
|
|||||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.disposables.Disposable
|
import io.reactivex.disposables.Disposable
|
||||||
import io.reactivex.schedulers.Schedulers
|
import io.reactivex.schedulers.Schedulers
|
||||||
import kotlinx.android.synthetic.main.controller_location.view.*
|
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@ -163,7 +161,6 @@ class LocationPickerController(args: Bundle) :
|
|||||||
get() =
|
get() =
|
||||||
resources!!.getString(R.string.nc_share_location)
|
resources!!.getString(R.string.nc_share_location)
|
||||||
|
|
||||||
|
|
||||||
override fun onViewBound(view: View) {
|
override fun onViewBound(view: View) {
|
||||||
setLocationDescription(false, receivedChosenGeocodingResult)
|
setLocationDescription(false, receivedChosenGeocodingResult)
|
||||||
binding.shareLocation.isClickable = false
|
binding.shareLocation.isClickable = false
|
||||||
@ -240,9 +237,12 @@ class LocationPickerController(args: Bundle) :
|
|||||||
|
|
||||||
locationOverlay = MyLocationNewOverlay(GpsMyLocationProvider(context), binding.map)
|
locationOverlay = MyLocationNewOverlay(GpsMyLocationProvider(context), binding.map)
|
||||||
locationOverlay.enableMyLocation()
|
locationOverlay.enableMyLocation()
|
||||||
locationOverlay.setPersonHotspot(20.0F,20.0F)
|
locationOverlay.setPersonHotspot(20.0F, 20.0F)
|
||||||
locationOverlay.setPersonIcon(
|
locationOverlay.setPersonIcon(
|
||||||
DisplayUtils.getBitmap(ResourcesCompat.getDrawable(resources!!, R.drawable.current_location_circle, null)))
|
DisplayUtils.getBitmap(
|
||||||
|
ResourcesCompat.getDrawable(resources!!, R.drawable.current_location_circle, null)
|
||||||
|
)
|
||||||
|
)
|
||||||
binding.map.overlays?.add(locationOverlay)
|
binding.map.overlays?.add(locationOverlay)
|
||||||
|
|
||||||
val mapController = binding.map.controller
|
val mapController = binding.map.controller
|
||||||
|
@ -24,6 +24,5 @@ import com.stfalcon.chatkit.commons.models.IMessage
|
|||||||
|
|
||||||
interface ExtendedIMessage : IMessage {
|
interface ExtendedIMessage : IMessage {
|
||||||
|
|
||||||
fun isLocationMessage() : Boolean
|
fun isLocationMessage(): Boolean
|
||||||
|
|
||||||
}
|
}
|
@ -33,7 +33,7 @@ class ChatUtils {
|
|||||||
val type = individualHashMap?.get("type")
|
val type = individualHashMap?.get("type")
|
||||||
if (type == "user" || type == "guest" || type == "call") {
|
if (type == "user" || type == "guest" || type == "call") {
|
||||||
resultMessage = resultMessage?.replace("{$key}", "@" + individualHashMap["name"])
|
resultMessage = resultMessage?.replace("{$key}", "@" + individualHashMap["name"])
|
||||||
} else if(type == "geo-location"){
|
} else if (type == "geo-location") {
|
||||||
resultMessage = individualHashMap.get("name")
|
resultMessage = individualHashMap.get("name")
|
||||||
} else if (individualHashMap?.containsKey("link") == true) {
|
} else if (individualHashMap?.containsKey("link") == true) {
|
||||||
resultMessage = if (type == "file") {
|
resultMessage = if (type == "file") {
|
||||||
|
@ -72,7 +72,9 @@ class AttachmentDialog(val activity: Activity, var chatController: ChatControlle
|
|||||||
|
|
||||||
if (!CapabilitiesUtil.hasSpreedFeatureCapability(
|
if (!CapabilitiesUtil.hasSpreedFeatureCapability(
|
||||||
chatController.conversationUser,
|
chatController.conversationUser,
|
||||||
"geo-location-sharing")){
|
"geo-location-sharing"
|
||||||
|
)
|
||||||
|
) {
|
||||||
shareLocationItem?.visibility = View.GONE
|
shareLocationItem?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user