Remove unnecessary changes
This commit is contained in:
parent
45966e929c
commit
1442f7a019
5 changed files with 10 additions and 17 deletions
|
@ -59,6 +59,7 @@
|
|||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/description_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
|
|
@ -45,9 +45,6 @@ class TelegramLocationProvider(private val app: TelegramApplication) : SensorEve
|
|||
var lastKnownLocation: net.osmand.Location? = null
|
||||
private set
|
||||
|
||||
var lastKnownLocationTime: Long? = null
|
||||
private set
|
||||
|
||||
val gpsInfo = GPSInfo()
|
||||
|
||||
private val locationListeners = ArrayList<TelegramLocationListener>()
|
||||
|
@ -435,7 +432,6 @@ class TelegramLocationProvider(private val app: TelegramApplication) : SensorEve
|
|||
updateGPSInfo(null)
|
||||
}
|
||||
if (location != null) {
|
||||
lastKnownLocationTime = location.time
|
||||
if (gpsSignalLost) {
|
||||
gpsSignalLost = false
|
||||
}
|
||||
|
|
|
@ -109,9 +109,7 @@ class TelegramSettings(private val app: TelegramApplication) {
|
|||
hiddenChats.intersect(presentChatIds)
|
||||
hiddenOnMapChats = hiddenChats.toHashSet()
|
||||
|
||||
shareChatsInfo = ConcurrentHashMap(shareChatsInfo.filter { (key, _) ->
|
||||
presentChatIds.contains(key)
|
||||
})
|
||||
shareChatsInfo = ConcurrentHashMap(shareChatsInfo.filter { (key, _) -> presentChatIds.contains(key) })
|
||||
}
|
||||
|
||||
fun shareLocationToChat(
|
||||
|
|
|
@ -813,10 +813,7 @@ class TelegramHelper private constructor() {
|
|||
parameters.applicationVersion = "1.0"
|
||||
parameters.enableStorageOptimizer = true
|
||||
|
||||
client!!.send(
|
||||
TdApi.SetTdlibParameters(parameters),
|
||||
AuthorizationRequestHandler()
|
||||
)
|
||||
client!!.send(TdApi.SetTdlibParameters(parameters), AuthorizationRequestHandler())
|
||||
}
|
||||
}
|
||||
TdApi.AuthorizationStateWaitEncryptionKey.CONSTRUCTOR -> {
|
||||
|
|
|
@ -9,6 +9,7 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import net.osmand.telegram.R
|
||||
import net.osmand.telegram.TelegramApplication
|
||||
|
@ -44,17 +45,17 @@ class SharingStatusBottomSheet : DialogFragment() {
|
|||
settings.sharingStatusChanges.reversed().forEach { sharingStatus ->
|
||||
inflater.inflate(R.layout.item_with_three_text_lines, itemsCont, false).apply {
|
||||
val sharingStatusType = sharingStatus.statusType
|
||||
val time = sharingStatus.locationTime
|
||||
|
||||
findViewById<ImageView>(R.id.icon).setImageDrawable(uiUtils.getIcon(sharingStatusType.iconId, sharingStatusType.iconColorRes))
|
||||
findViewById<TextView>(R.id.title).text = sharingStatus.getDescription(app)
|
||||
findViewById<TextView>(R.id.status_change_time).text =
|
||||
OsmandFormatter.getFormattedTime(sharingStatus.statusChangeTime, false)
|
||||
val time = sharingStatus.locationTime
|
||||
findViewById<TextView>(R.id.status_change_time).text = OsmandFormatter.getFormattedTime(sharingStatus.statusChangeTime, false)
|
||||
findViewById<TextView>(R.id.last_location_line).text = getString(sharingStatusType.descriptionId)
|
||||
|
||||
if (time > 0) {
|
||||
val sentTime = OsmandFormatter.getFormattedTime(time, false)
|
||||
findViewById<TextView>(R.id.last_location_line_time).text = sentTime
|
||||
findViewById<TextView>(R.id.last_location_line_time).text = OsmandFormatter.getFormattedTime(time, false)
|
||||
} else {
|
||||
findViewById<TextView>(R.id.last_location_line_time).text = "-"
|
||||
findViewById<LinearLayout>(R.id.description_container).visibility = View.INVISIBLE
|
||||
}
|
||||
if (sharingStatusType.canResendLocation) {
|
||||
findViewById<TextView>(R.id.re_send_location).apply {
|
||||
|
|
Loading…
Reference in a new issue