Remove shadow warning

This commit is contained in:
Philoul 2023-08-06 10:29:07 +02:00
parent 26dff28e1c
commit 54e2a3f72c
3 changed files with 5 additions and 5 deletions

View file

@ -82,7 +82,7 @@ class WearFragment : DaggerFragment() {
.subscribe({ .subscribe({
it.customWatchfaceData?.let { wearPlugin.savedCustomWatchface = it } it.customWatchfaceData?.let { wearPlugin.savedCustomWatchface = it }
if (it.exportFile) if (it.exportFile)
ToastUtils.okToast(context,rh.gs(R.string.wear_new_custom_watchface_received)) ToastUtils.okToast(activity, rh.gs(R.string.wear_new_custom_watchface_exported))
updateGui() updateGui()
}, fabricPrivacy::logException) }, fabricPrivacy::logException)
if (wearPlugin.savedCustomWatchface == null) if (wearPlugin.savedCustomWatchface == null)

View file

@ -365,7 +365,7 @@
<string name="wear_load_watchface">Load Watchface</string> <string name="wear_load_watchface">Load Watchface</string>
<string name="wear_send_watchface">Send Watchface</string> <string name="wear_send_watchface">Send Watchface</string>
<string name="wear_export_watchface">Export Watchface</string> <string name="wear_export_watchface">Export Watchface</string>
<string name="wear_new_custom_watchface_received">New watchface received from watch</string> <string name="wear_new_custom_watchface_exported">Custom watchface exported</string>
<string name="resend_all_data">Resend All Data</string> <string name="resend_all_data">Resend All Data</string>
<string name="open_settings_on_wear">Open Settings on Wear</string> <string name="open_settings_on_wear">Open Settings on Wear</string>

View file

@ -117,9 +117,9 @@ class CustomWatchface : BaseWatchFace() {
private fun setWatchfaceStyle() { private fun setWatchfaceStyle() {
val customWatchface = persistence.readCustomWatchface() ?: persistence.readCustomWatchface(true) val customWatchface = persistence.readCustomWatchface() ?: persistence.readCustomWatchface(true)
customWatchface?.let { customWatchface -> customWatchface?.let {
val json = JSONObject(customWatchface.customWatchfaceData.json) val json = JSONObject(it.customWatchfaceData.json)
val drawableDataMap = customWatchface.customWatchfaceData.drawableDatas val drawableDataMap = it.customWatchfaceData.drawableDatas
enableSecond = (if (json.has("enableSecond")) json.getBoolean("enableSecond") else false) && sp.getBoolean(R.string.key_show_seconds, true) enableSecond = (if (json.has("enableSecond")) json.getBoolean("enableSecond") else false) && sp.getBoolean(R.string.key_show_seconds, true)
highColor = if (json.has("highColor")) Color.parseColor(json.getString("highColor")) else ContextCompat.getColor(this, R.color.dark_highColor) highColor = if (json.has("highColor")) Color.parseColor(json.getString("highColor")) else ContextCompat.getColor(this, R.color.dark_highColor)