Skip to content

Commit 2ea261b

Browse files
author
ELY M
committed
55939-elys
1 parent 7c456fe commit 2ea261b

11 files changed

Lines changed: 36 additions & 46 deletions

File tree

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2424
xmlns:tools="http://schemas.android.com/tools"
25-
android:versionCode="55938"
26-
android:versionName="55938-elys">
25+
android:versionCode="55939"
26+
android:versionName="55939-elys">
2727

2828
<uses-permission android:name="android.permission.INTERNET" />
2929
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

app/src/main/java/joshuatee/wx/misc/HourlyActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import joshuatee.wx.R
3232
import joshuatee.wx.settings.Location
3333
import joshuatee.wx.ui.BaseActivity
3434
import joshuatee.wx.ui.Card
35-
import joshuatee.wx.ui.CardVerticalText2
35+
import joshuatee.wx.ui.CardVerticalText
3636
import joshuatee.wx.util.UtilityShare
3737
import joshuatee.wx.externalGraphView.series.DataPoint
3838
import joshuatee.wx.externalGraphView.series.LineGraphSeries
@@ -60,7 +60,7 @@ class HourlyActivity : BaseActivity() {
6060

6161
private var htmlShare = listOf<String>()
6262
private lateinit var card: Card
63-
private lateinit var cardVerticalText: CardVerticalText2
63+
private lateinit var cardVerticalText: CardVerticalText
6464
private lateinit var scrollView: ScrollView
6565
private lateinit var box: VBox
6666
private lateinit var graphCard: Card
@@ -95,7 +95,7 @@ class HourlyActivity : BaseActivity() {
9595
graphCard.setCardBackgroundColor(Color.BLACK)
9696
graph = findViewById(R.id.graph)
9797
graphCard.visibility = View.GONE
98-
cardVerticalText = CardVerticalText2(this, toolbar)
98+
cardVerticalText = CardVerticalText(this, toolbar)
9999
box.addWidget(cardVerticalText)
100100
cardVerticalText.connect { scrollView.scrollTo(0, 0) }
101101
val padding = 100

app/src/main/java/joshuatee/wx/objects/URL.kt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
package joshuatee.wx.objects
88

9-
import joshuatee.wx.common.GlobalVariables
109
import joshuatee.wx.MyApplication
1110
import joshuatee.wx.util.UtilityLog
1211
import okhttp3.Request
@@ -47,15 +46,15 @@ class URL(val url: String) {
4746
// return out.toString().replace(breakStr, "<br>")
4847
// }
4948

50-
fun getBytes(): ByteArray {
51-
UtilityLog.download("getByte $url")
52-
return try {
53-
val request = Request.Builder().url(url).build()
54-
val response = MyApplication.httpClient.newCall(request).execute()
55-
response.body.bytes()
56-
} catch (e: Exception) {
57-
UtilityLog.handleException(e)
58-
ByteArray(0)
59-
}
60-
}
49+
// fun getBytes(): ByteArray {
50+
// UtilityLog.download("getByte $url")
51+
// return try {
52+
// val request = Request.Builder().url(url).build()
53+
// val response = MyApplication.httpClient.newCall(request).execute()
54+
// response.body.bytes()
55+
// } catch (e: Exception) {
56+
// UtilityLog.handleException(e)
57+
// ByteArray(0)
58+
// }
59+
// }
6160
}

app/src/main/java/joshuatee/wx/settings/FavAddActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class FavAddActivity : BaseActivity() {
6666
private fun setupVars() {
6767
when (type) {
6868
FavoriteType.SND -> {
69-
// data = GlobalArrays.soundingSites.map { "$it " + UtilityLocation.getSoundingSiteName(it) }
7069
data = SoundingSites.sites.nameList
7170
verboseTitle = "sounding site"
7271
}

app/src/main/java/joshuatee/wx/settings/FavRemoveActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ class FavRemoveActivity : BaseActivity() {
157157
}
158158

159159
private fun getFullString(shortCode: String) = when (type) {
160-
// FavoriteType.SND -> UtilityLocation.getSoundingSiteName(shortCode)
161160
FavoriteType.SND -> SoundingSites.sites.byCode[shortCode]!!.fullName
162161
FavoriteType.WFO -> shortCode + ": " + WfoSites.getFullName(shortCode)
163162
FavoriteType.RID -> shortCode + ": " + RadarSites.getName(shortCode)

app/src/main/java/joshuatee/wx/settings/Location.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ object Location {
7979
currentLocation = To.int(currentLocationStr) - 1
8080
}
8181

82-
// val state get() = locations.getOrNull(currentLocation)?.state ?: "MI"
83-
8482
val wfo get() = locations.getOrNull(currentLocation)?.wfo ?: "DTX"
8583

8684
val rid get() = locations.getOrNull(currentLocation)?.rid ?: "DTX"
@@ -179,8 +177,6 @@ object Location {
179177
wfo = wfoAndRadar[0]
180178
radarSite = wfoAndRadar[1]
181179
if (wfo == "") {
182-
// wfo = UtilityLocation.getNearestOffice(OfficeTypeEnum.WFO, LatLon(xStr, yStr))
183-
// .lowercase(Locale.US)
184180
wfo = WfoSites.sites.getNearest(LatLon(xStr, yStr))
185181
}
186182
if (radarSite == "" || radarSite == "LIX") {

app/src/main/java/joshuatee/wx/settings/RadarPreferences.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ object RadarPreferences {
3838
//elys mod
3939
var sn_key = ""
4040
var sn_locationreport = false
41-
//
42-
// Radar Preferences
43-
//
4441
var showRadarWhenPan = true
4542
var warnings = false
4643
var locationDotFollowsGps = false

app/src/main/java/joshuatee/wx/settings/UtilityHomeScreen.kt

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ import joshuatee.wx.spc.SpcMesoActivity
3838
import joshuatee.wx.spc.SpcSoundingsActivity
3939
import joshuatee.wx.spc.SpcThunderStormOutlookActivity
4040
import joshuatee.wx.ui.CardHSImage
41-
import joshuatee.wx.util.SoundingSites
4241
import joshuatee.wx.vis.GoesActivity
4342
import joshuatee.wx.wpc.NationalImagesActivity
4443
import joshuatee.wx.wpc.NationalTextActivity
45-
import java.util.Locale
4644

4745
internal object UtilityHomeScreen {
4846

@@ -79,15 +77,14 @@ internal object UtilityHomeScreen {
7977
homeScreenImageCards[ii].connect {
8078
if (argsOrig != null) {
8179
val args = argsOrig.copyOf(argsOrig.size)
82-
args.indices.forEach { z ->
83-
if (args[z] == "WFO_FOR_SND") // Check that this is not needed TODO FIXME
84-
args[z] = SoundingSites.sites.getNearest(Location.latLon)
85-
// args[z] = UtilityLocation.getNearestSoundingSite(LatLon(Location.x, Location.y))
86-
if (args[z] == "WFO_FOR_GOES")
87-
args[z] = Location.wfo.lowercase(Locale.US)
88-
if (args[z] == "RID_FOR_CA")
89-
args[z] = Location.rid
90-
}
80+
// args.indices.forEach { z ->
81+
// if (args[z] == "WFO_FOR_SND")
82+
// args[z] = SoundingSites.sites.getNearest(Location.latLon)
83+
// if (args[z] == "WFO_FOR_GOES")
84+
// args[z] = Location.wfo.lowercase(Locale.US)
85+
// if (args[z] == "RID_FOR_CA")
86+
// args[z] = Location.rid
87+
// }
9188
if (cl != null && id != null) {
9289
val intent = Intent(MyApplication.appContext, cl)
9390
intent.putExtra(id, args)
@@ -165,12 +162,13 @@ internal object UtilityHomeScreen {
165162
classId["GOES16"] = GoesActivity.RID
166163

167164
classes["SND"] = SpcSoundingsActivity::class.java
168-
classArgs["SND"] = arrayOf("WFO_FOR_SND", "")
165+
// classArgs["SND"] = arrayOf("WFO_FOR_SND", "")
166+
classArgs["SND"] = arrayOf("", "")
169167
classId["SND"] = SpcSoundingsActivity.URL
170168

171-
classes["OBS"] = SpcSoundingsActivity::class.java
172-
classArgs["OBS"] = arrayOf("", "")
173-
classId["OBS"] = SpcSoundingsActivity.URL
169+
// classes["OBS"] = SpcSoundingsActivity::class.java
170+
// classArgs["OBS"] = arrayOf("", "")
171+
// classId["OBS"] = SpcSoundingsActivity.URL
174172

175173
classes["RTMA_DEW"] = RtmaActivity::class.java
176174
classArgs["RTMA_DEW"] = arrayOf("2m_dwpt")

app/src/main/java/joshuatee/wx/spc/SPCSoundingsActivity.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ class SpcSoundingsActivity : BaseActivity(), OnMenuItemClickListener {
9393
objectToolbarBottom.connect(this)
9494
star = objectToolbarBottom.getFavIcon()
9595
touchImage = TouchImage(this, toolbar, toolbarBottom, R.id.iv)
96-
// office = UtilityLocation.getNearestSoundingSite(Location.latLon)
97-
9896
office = if (arguments.size > 1 && arguments[1] != "") {
9997
arguments[1]
10098
} else {

app/src/main/java/joshuatee/wx/ui/CardVerticalText2.kt renamed to app/src/main/java/joshuatee/wx/ui/CardVerticalText.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import android.view.View
2727
import androidx.appcompat.widget.Toolbar
2828
import joshuatee.wx.objects.TextSize
2929

30-
class CardVerticalText2(val context: Context) : Widget {
30+
class CardVerticalText(val context: Context) : Widget {
3131

3232
private val card = Card(context)
3333
private val box = VBox(context, Gravity.CENTER)

0 commit comments

Comments
 (0)