02-02-1403 / Rhmn / release Android version:3.2.0 .

This commit is contained in:
OkaykOrhmn 2024-05-22 16:34:31 +03:30
parent 993a5b86bf
commit 8c18242d2e
13 changed files with 744 additions and 549 deletions

View File

@ -5,6 +5,9 @@ import android.appwidget.AppWidgetManager
import android.content.Context import android.content.Context
import android.content.SharedPreferences import android.content.SharedPreferences
import android.net.Uri import android.net.Uri
import android.view.View.GONE
import android.view.View.INVISIBLE
import android.view.View.VISIBLE
import android.widget.RemoteViews import android.widget.RemoteViews
import com.squareup.picasso.MemoryPolicy import com.squareup.picasso.MemoryPolicy
import com.squareup.picasso.NetworkPolicy import com.squareup.picasso.NetworkPolicy
@ -12,6 +15,7 @@ import com.squareup.picasso.Picasso
import com.squareup.picasso.Transformation import com.squareup.picasso.Transformation
import es.antonborri.home_widget.HomeWidgetLaunchIntent import es.antonborri.home_widget.HomeWidgetLaunchIntent
import es.antonborri.home_widget.HomeWidgetProvider import es.antonborri.home_widget.HomeWidgetProvider
import es.antonborri.home_widget.HomeWidgetBackgroundIntent
import java.lang.Exception import java.lang.Exception
@ -40,12 +44,25 @@ class FavWidget : HomeWidgetProvider() {
val responses: ArrayList<WidgetResponse> = ArrayList(); val responses: ArrayList<WidgetResponse> = ArrayList();
val token = widgetData.getString("token", "").toString() val token = widgetData.getString("token", "").toString()
if (token.isEmpty()) {
setViewVisibility(R.id.list_lay, INVISIBLE)
setViewVisibility(R.id.setting_btn, INVISIBLE)
setViewVisibility(R.id.empty_lay, VISIBLE)
setOnClickPendingIntent(R.id.empty_lay, pendingIntent)
} else {
setViewVisibility(R.id.list_lay, VISIBLE)
setViewVisibility(R.id.setting_btn, VISIBLE)
setViewVisibility(R.id.empty_lay, GONE)
for (i in 0..2) { for (i in 0..2) {
responses.add( responses.add(
WidgetResponse( WidgetResponse(
id = widgetData.getString("id${i + 1}", "")?.toInt() ?: 0, id = widgetData.getString("id${i + 1}", "")?.toInt() ?: 0,
title = widgetData.getString("title${i + 1}", "").toString(), title = widgetData.getString("title${i + 1}", "").toString(),
createdAt = widgetData.getString("createdAt${i + 1}", "").toString(), createdAt = widgetData.getString("createdAt${i + 1}", "")
.toString(),
type = widgetData.getString("type${i + 1}", "").toString(), type = widgetData.getString("type${i + 1}", "").toString(),
link = widgetData.getString("link${i + 1}", "").toString(), link = widgetData.getString("link${i + 1}", "").toString(),
category = widgetData.getString("category${i + 1}", "").toString(), category = widgetData.getString("category${i + 1}", "").toString(),
@ -107,40 +124,34 @@ class FavWidget : HomeWidgetProvider() {
// Pending intent to update counter on button click // Pending intent to update counter on button click
val settingIntent = HomeWidgetLaunchIntent.getActivity( val settingIntent = HomeWidgetBackgroundIntent.getBroadcast(
context, context, Uri.parse("myAppWidget://setting")
MainActivity::class.java,
Uri.parse("myAppWidget://setting"),
) )
setOnClickPendingIntent(R.id.setting_btn, settingIntent) setOnClickPendingIntent(R.id.setting_btn, settingIntent)
val rowFirst = HomeWidgetLaunchIntent.getActivity( val rowFirst = HomeWidgetBackgroundIntent.getBroadcast(
context, context,
MainActivity::class.java, Uri.parse("myAppWidget://rowFirst")
Uri.parse("myAppWidget://rowFirst"),
) )
setOnClickPendingIntent(R.id.first_row, rowFirst) setOnClickPendingIntent(R.id.first_row, rowFirst)
val rowMiddle = HomeWidgetLaunchIntent.getActivity( val rowMiddle = HomeWidgetBackgroundIntent.getBroadcast(
context, context,
MainActivity::class.java, Uri.parse("myAppWidget://rowMiddle")
Uri.parse("myAppWidget://rowMiddle"),
) )
setOnClickPendingIntent(R.id.middle_row, rowMiddle) setOnClickPendingIntent(R.id.middle_row, rowMiddle)
val rowLast = HomeWidgetLaunchIntent.getActivity( val rowLast = HomeWidgetBackgroundIntent.getBroadcast(
context, context,
MainActivity::class.java, Uri.parse("myAppWidget://rowLast")
Uri.parse("myAppWidget://rowLast"),
) )
setOnClickPendingIntent(R.id.last_row, rowLast) setOnClickPendingIntent(R.id.last_row, rowLast)
}
} }
appWidgetManager.updateAppWidget(widgetId, views) appWidgetManager.updateAppWidget(widgetId, views)

View File

@ -0,0 +1,184 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="280dp"
android:height="170dp"
android:viewportWidth="320"
android:viewportHeight="210">
<group>
<clip-path
android:pathData="M320,0l-320,0l-0,210l320,0z"/>
<path
android:pathData="M28.56,206.22H25.63C24.41,206.22 23.4,207.07 23.4,208.12C23.4,209.17 24.41,210 25.63,210H28.56C29.79,210 30.78,209.15 30.78,208.12C30.78,207.07 29.79,206.22 28.56,206.22Z"
android:fillColor="#012348"
android:fillType="evenOdd"/>
<path
android:pathData="M280.54,206.23H274.5C271.98,206.23 269.92,207.07 269.92,208.12C269.92,209.17 271.98,210 274.5,210H280.54C283.07,210 285.13,209.15 285.13,208.12C285.13,207.07 283.07,206.23 280.54,206.23Z"
android:fillColor="#012348"
android:fillType="evenOdd"/>
<path
android:pathData="M34.33,206.22H266.82C267.27,206.27 267.69,206.49 267.98,206.85C268.28,207.2 268.42,207.65 268.39,208.12V208.12C268.42,208.57 268.28,209.03 267.98,209.38C267.69,209.73 267.27,209.95 266.82,210H34.33C33.87,209.96 33.45,209.74 33.15,209.39C32.85,209.04 32.7,208.58 32.73,208.12V208.12C32.7,207.65 32.85,207.19 33.15,206.84C33.45,206.49 33.87,206.26 34.33,206.22V206.22Z"
android:fillColor="#012348"
android:fillType="evenOdd"/>
<path
android:pathData="M57.46,144.05C61.43,144.01 65.23,142.39 68.02,139.55C70.81,136.7 72.37,132.86 72.35,128.86V128.86C72.37,124.86 70.81,121.02 68.02,118.17C65.23,115.32 61.43,113.7 57.46,113.66H55.66C47.15,113.66 40.18,106.55 40.18,97.86C40.18,89.17 47.15,82.06 55.66,82.06H90.11C90.11,82.06 115.31,80.87 120.14,66.22C124.97,51.56 128.9,44.16 156.58,44.16H177.05C179.8,44.13 182.42,43.01 184.34,41.05C186.27,39.08 187.34,36.43 187.33,33.67V33.67C187.34,30.91 186.27,28.26 184.34,26.3C182.42,24.33 179.8,23.22 177.05,23.19H170.23C168.34,23.17 166.53,22.4 165.2,21.04C163.87,19.69 163.13,17.86 163.14,15.95V15.95C163.13,14.05 163.87,12.22 165.2,10.86C166.53,9.51 168.34,8.74 170.23,8.72H212.52C230.74,8.72 231.54,0.02 238.76,0.02H273C274.45,0.04 275.84,0.63 276.86,1.67C277.88,2.71 278.44,4.11 278.44,5.57V5.57C278.44,7.02 277.87,8.42 276.85,9.45C275.83,10.49 274.45,11.08 273,11.09H267.78C265.68,11.11 263.67,11.97 262.2,13.48C260.72,14.98 259.9,17.01 259.91,19.13V19.13C259.9,21.24 260.72,23.27 262.2,24.78C263.67,26.28 265.68,27.14 267.78,27.16H297.4C308.52,27.16 317.63,36.45 317.63,47.8C317.63,59.15 308.52,68.44 297.4,68.44H273.98C263.28,68.44 254.52,77.37 254.52,88.29C254.52,99.21 263.28,108.14 273.98,108.14C299.29,108.14 320,129.26 320,155.09C320,180.92 299.29,202.04 273.98,202.04H28.42C12.79,202.04 -0,188.99 -0,173.05C-0,157.1 12.79,144.05 28.42,144.05H57.46V144.05ZM293.7,5.55C293.68,4.47 293.35,3.42 292.74,2.53C292.14,1.64 291.29,0.95 290.29,0.55C289.3,0.15 288.21,0.05 287.16,0.27C286.11,0.49 285.15,1.02 284.4,1.79C283.64,2.55 283.13,3.53 282.93,4.59C282.73,5.65 282.84,6.74 283.25,7.73C283.67,8.73 284.36,9.58 285.26,10.17C286.15,10.77 287.19,11.09 288.27,11.09C288.98,11.09 289.69,10.94 290.36,10.66C291.02,10.37 291.62,9.96 292.12,9.45C292.63,8.93 293.02,8.32 293.29,7.65C293.56,6.98 293.7,6.27 293.69,5.55H293.7Z"
android:fillColor="#E0E0E0"
android:fillType="evenOdd"/>
<path
android:pathData="M123.22,93.14C123.94,92.27 124.81,91.55 125.78,90.99C125.84,90.95 125.91,90.93 125.98,90.92C126.05,90.9 126.13,90.91 126.2,90.93C126.27,90.95 126.33,90.98 126.39,91.03C126.44,91.07 126.49,91.13 126.53,91.19C127.25,92.57 127.92,93.95 128.76,95.25C129.03,95.72 129.37,96.15 129.77,96.51C129.82,96.54 129.87,96.57 129.93,96.59C129.93,96.59 129.93,96.59 129.93,96.59C129.99,96.48 130.04,96.37 130.07,96.26C130.71,94.26 129.93,92.11 130.44,90.08C130.76,88.97 131.35,87.95 132.15,87.12C132.98,86.28 134.09,85.88 134.62,84.74C134.65,84.67 134.7,84.61 134.76,84.56C134.83,84.51 134.9,84.48 134.98,84.47H135.09C135.19,84.48 135.28,84.51 135.36,84.56C135.44,84.61 135.51,84.68 135.57,84.75C136.77,86.48 138.45,88.28 138.76,90.45C139.05,92.36 138.02,93.97 136.91,95.43C136.36,96.13 135.87,96.88 135.44,97.66C135.21,98.08 134.81,98.86 135.22,99.29C135.64,99.73 136.32,98.95 136.66,98.59C137.35,97.84 137.99,97.04 138.57,96.21C139.58,94.86 141.2,92.84 143.08,93.2C143.92,93.36 144.25,94.26 144.3,94.98C144.37,96.21 143.78,97.5 143.19,98.51C141.87,100.8 139.15,101.46 137.42,103.32C137.02,103.73 135.92,105.19 136.55,105.79C136.77,106 137.28,105.93 137.53,105.9C138.2,105.81 138.84,105.55 139.4,105.16C141.35,103.64 142.07,100.99 144.12,99.55C144.61,99.19 145.16,98.94 145.75,98.81C146.34,98.68 146.94,98.67 147.53,98.79C147.95,98.91 148.31,99.17 148.56,99.52C148.81,99.87 148.94,100.3 148.91,100.74C148.89,101.83 148.55,102.89 147.94,103.79C147.34,104.82 146.48,105.68 145.45,106.28C143.37,107.47 140.75,107.63 139.36,109.8C139.24,109.95 139.16,110.12 139.11,110.3C139.06,110.48 139.04,110.67 139.07,110.85C139.13,111.13 139.53,111.23 139.77,111.28C140.94,111.43 142.13,111.2 143.16,110.62C144.29,110.02 145.11,108.92 145.99,107.98C146.85,107 147.96,106.27 149.2,105.86C150.13,105.57 151.3,105.61 151.88,106.49C152.46,107.37 152.32,108.38 152.1,109.26C151.78,110.46 151.19,111.55 150.37,112.47C149.52,113.46 148.18,114.01 146.98,114.43C145.78,114.84 144.43,115.12 143.19,115.57C142.89,115.7 142.58,115.78 142.25,115.81C141.87,115.81 141.49,115.85 141.12,115.92C140.8,116 141.01,116.34 141.12,116.56C141.37,117.13 142.17,117.09 142.69,117.13C143.22,117.17 143.66,117.3 144.15,117.3C144.72,117.28 145.28,117.22 145.83,117.11C146.93,116.94 148.1,116.75 149.18,117.08C149.7,117.26 150.15,117.58 150.5,118C150.85,118.43 151.07,118.93 151.16,119.47C151.55,121.71 149.06,123.07 147.22,123.36C146.08,123.53 144.91,123.3 143.92,122.69C142.64,121.97 141.63,120.9 140.14,120.71C140.1,121.01 140.13,121.31 140.24,121.58C140.36,121.85 140.54,122.08 140.78,122.26C141.58,122.82 142.47,123.24 143.41,123.51C145.13,124.16 147.65,124.74 148.58,126.54C148.63,126.64 148.66,126.76 148.64,126.88C148.62,127 148.57,127.11 148.49,127.19C147.72,128.02 146.69,128.55 145.58,128.69C144.62,128.7 143.68,128.39 142.91,127.81C141.54,126.88 140.35,125.45 138.8,124.81C139.06,125.21 139.41,125.55 139.81,125.81C140.54,126.42 141.03,127.27 141.2,128.2C141.52,129.63 141.02,131.19 139.35,131.19C138.42,131.12 137.53,130.8 136.76,130.28C135.9,129.74 135.18,129 134.66,128.12C134.01,127.04 133.59,125.84 133.41,124.59C132.01,127.32 128.98,130.18 126.11,127.82C123.66,125.79 127.68,124.24 129.29,122.65C128.97,122.79 128.67,122.95 128.38,123.09C127.55,123.51 126.75,123.99 125.87,124.35C124.26,125.01 122.44,124.94 121.47,123.26C120.64,121.83 122.37,121.15 123.44,120.84C124.3,120.57 125.92,120.31 126.55,119.43C124.41,119.65 122.03,119.95 120.19,118.67C119.35,118.11 118.36,117.03 118.25,115.97C118.17,115.12 119.11,114.8 119.78,114.74C121.59,114.55 123.36,115.36 125.2,115.3C125.64,115.29 126.07,115.24 126.5,115.15C126.66,115.11 126.82,115.06 126.98,114.99C127.03,114.96 127.08,114.93 127.13,114.89C127.12,114.86 127.11,114.83 127.08,114.8C126.91,114.62 126.71,114.46 126.5,114.33C126.04,114.03 125.52,113.85 124.98,113.8C123.93,113.68 122.88,113.8 121.8,113.63C120.64,113.39 119.6,112.75 118.86,111.83C118.09,111.04 117.57,110.04 117.38,108.95C117.26,107.82 117.93,107.08 118.92,106.69C121.7,105.63 123.33,108.51 125.3,109.82C125.85,110.15 126.43,110.41 127.05,110.59C127.29,110.65 128.01,110.9 128.24,110.72C128.38,110.59 127.91,109.83 127.82,109.69C127.43,109.07 126.89,108.56 126.25,108.21C124.6,107.25 122.57,106.97 121.28,105.46C120.41,104.47 119.74,102.79 120.58,101.59C121.47,100.32 123.45,100.65 124.57,101.4C125.97,102.35 126.67,104.24 128.37,104.68C128.42,104.27 128.38,103.86 128.26,103.47C128.13,103.08 127.93,102.72 127.66,102.41C126.82,101.41 125.91,100.47 124.92,99.61C123.96,98.78 123.18,97.75 122.64,96.59C122.41,96.01 122.35,95.39 122.45,94.78C122.56,94.17 122.82,93.61 123.22,93.14Z"
android:fillColor="#EBEBEB"
android:fillType="evenOdd"/>
<path
android:pathData="M81.39,131.96C81.16,130.86 81.13,129.73 81.29,128.61C81.31,128.46 81.39,128.33 81.51,128.25C81.63,128.16 81.77,128.12 81.92,128.14C83.43,128.43 84.94,128.74 86.47,128.9C87.01,128.97 87.55,128.96 88.08,128.86C88.13,128.85 88.18,128.83 88.23,128.8C88.23,128.79 88.23,128.78 88.23,128.77C88.19,128.66 88.14,128.55 88.07,128.46C86.9,126.69 84.74,126 83.48,124.33C82.8,123.4 82.37,122.31 82.23,121.16C82.08,119.99 82.46,118.87 81.89,117.75C81.68,117.35 82.11,116.98 82.48,117.01C84.58,117.14 87.02,116.92 88.91,117.99C90.58,118.97 91.2,120.79 91.66,122.55C91.87,123.42 92.14,124.27 92.47,125.1C92.67,125.54 93.04,126.32 93.62,126.26C94.21,126.21 94.03,125.21 93.97,124.68C93.8,123.68 93.58,122.69 93.3,121.71C92.87,120.09 92.25,117.55 93.73,116.28C94.38,115.75 95.27,116 95.89,116.44C96.88,117.13 97.53,118.39 97.95,119.47C98.91,121.96 97.76,124.51 98.12,127.03C98.2,127.61 98.65,129.37 99.52,129.24C99.82,129.21 100.08,128.75 100.21,128.51C100.55,127.93 100.75,127.28 100.79,126.6C100.79,124.11 99.18,121.91 99.33,119.39C99.39,118.18 99.93,117.04 100.82,116.22C101.56,115.63 102.51,115.85 103.22,116.35C104.05,117.05 104.67,117.96 105,118.99C105.43,120.11 105.57,121.33 105.39,122.52C105.04,124.88 103.53,127.05 104.38,129.5C104.47,129.87 104.7,130.19 105.02,130.38C105.28,130.51 105.59,130.26 105.78,130.1C106.63,129.27 107.18,128.18 107.36,127C107.59,125.73 107.24,124.41 107.06,123.15C106.83,121.85 106.94,120.52 107.37,119.28C107.72,118.36 108.48,117.48 109.54,117.56C110.5,117.63 111.28,118.38 111.83,119.12C112.56,120.1 113.06,121.25 113.26,122.46C113.52,123.75 113.12,125.14 112.69,126.36C112.26,127.56 111.64,128.78 111.25,130.05C111.17,130.37 111.03,130.67 110.85,130.95C110.62,131.25 110.41,131.57 110.23,131.91C110.1,132.22 110.49,132.25 110.75,132.32C111.34,132.44 111.8,131.79 112.18,131.41C112.56,131.03 112.91,130.75 113.23,130.35C113.57,129.89 113.86,129.41 114.13,128.91C114.6,127.87 115.3,126.96 116.17,126.23C116.63,125.94 117.16,125.78 117.7,125.76C118.25,125.74 118.78,125.87 119.26,126.14C121.25,127.22 120.78,130.04 119.86,131.67C119.28,132.68 118.37,133.45 117.3,133.88C115.93,134.4 114.48,134.57 113.42,135.64C113.62,135.85 113.87,136 114.15,136.07C114.43,136.15 114.72,136.14 115,136.06C115.94,135.8 116.83,135.37 117.62,134.79C119.2,133.84 121.2,132.2 123.17,132.59C123.29,132.6 123.4,132.65 123.48,132.74C123.57,132.83 123.62,132.94 123.63,133.06C123.81,134.17 123.58,135.32 123,136.28C122.41,137.04 121.6,137.59 120.67,137.84C119.1,138.37 117.24,138.41 115.77,139.23C116.25,139.28 116.73,139.22 117.19,139.07C118.11,138.86 119.07,138.99 119.9,139.45C121.23,140.08 122.13,141.43 121.11,142.75C120.48,143.44 119.68,143.95 118.79,144.23C117.83,144.58 116.81,144.7 115.8,144.57C114.56,144.41 113.36,144.01 112.27,143.38C113.54,146.18 113.89,150.33 110.27,151.15C107.17,151.81 108.46,147.67 108.2,145.43C108.1,145.75 108.05,146.1 107.98,146.41C107.8,147.34 107.67,148.27 107.41,149.16C106.93,150.87 105.76,152.25 103.85,151.99C102.2,151.75 102.75,149.97 103.16,148.93C103.49,148.08 104.28,146.62 103.98,145.58C102.84,147.44 101.58,149.47 99.47,150.16C98.51,150.46 97.04,150.59 96.15,150.01C95.43,149.54 95.76,148.62 96.15,148.05C97.14,146.49 98.86,145.6 99.95,144.1C100.21,143.75 100.44,143.38 100.64,142.99C100.71,142.83 100.77,142.67 100.82,142.51C100.82,142.45 100.82,142.39 100.82,142.33C100.79,142.33 100.76,142.33 100.72,142.33C100.47,142.35 100.23,142.41 99.99,142.49C99.47,142.66 99,142.96 98.63,143.36C97.88,144.12 97.33,145.04 96.53,145.77C95.62,146.54 94.48,146.97 93.3,146.98C92.21,147.1 91.12,146.89 90.15,146.38C89.2,145.79 89.03,144.8 89.35,143.74C90.24,140.91 93.49,141.41 95.73,140.66C96.33,140.43 96.89,140.12 97.4,139.74C97.61,139.59 98.26,139.18 98.25,138.88C98.25,138.71 97.37,138.6 97.2,138.58C96.48,138.5 95.76,138.61 95.1,138.89C93.34,139.62 91.86,141.04 89.85,141.13C88.54,141.19 86.83,140.69 86.4,139.27C85.98,137.86 87.45,136.44 88.72,136.01C90.32,135.49 92.23,136.09 93.64,135.04C93.35,134.75 93.01,134.52 92.63,134.37C92.25,134.23 91.84,134.17 91.43,134.19C90.12,134.24 88.82,134.38 87.53,134.62C86.29,134.87 85.01,134.85 83.78,134.55C83.18,134.38 82.64,134.05 82.22,133.6C81.8,133.14 81.51,132.57 81.39,131.96V131.96Z"
android:fillColor="#E6F3FA"
android:fillType="evenOdd"/>
<path
android:pathData="M155.71,101.59C156.77,101.21 157.88,101.04 159,101.06C159.07,101.06 159.14,101.07 159.21,101.1C159.28,101.13 159.34,101.17 159.38,101.22C159.43,101.28 159.47,101.34 159.5,101.41C159.52,101.48 159.53,101.55 159.52,101.62C159.45,103.17 159.3,104.72 159.36,106.26C159.35,106.8 159.43,107.34 159.59,107.85C159.59,107.85 159.65,107.94 159.67,107.99C159.69,108.03 159.67,107.99 159.7,107.99C159.81,107.94 159.91,107.87 159.99,107.79C161.57,106.4 162,104.15 163.47,102.69C164.31,101.9 165.34,101.33 166.46,101.04C167.59,100.74 168.75,100.97 169.78,100.27C170.15,100 170.57,100.39 170.6,100.79C170.74,102.91 171.25,105.31 170.42,107.32C169.68,109.12 167.97,109.96 166.27,110.66C165.44,110.96 164.64,111.34 163.88,111.79C163.46,112.04 162.72,112.51 162.86,113.08C163.01,113.65 163.98,113.36 164.44,113.22C165.41,112.92 166.36,112.57 167.29,112.16C168.84,111.54 171.25,110.62 172.69,111.91C173.32,112.51 173.17,113.42 172.82,114.08C172.27,115.14 171.1,115.97 170.08,116.54C167.76,117.79 165.1,116.98 162.65,117.67C162.09,117.81 160.4,118.49 160.64,119.34C160.72,119.62 161.19,119.84 161.44,119.93C162.05,120.21 162.73,120.32 163.4,120.25C165.87,119.96 167.83,118.08 170.33,117.89C171.53,117.82 172.71,118.21 173.63,118.99C173.92,119.31 174.09,119.72 174.13,120.16C174.16,120.6 174.04,121.03 173.8,121.4C173.22,122.31 172.39,123.04 171.42,123.51C170.37,124.08 169.19,124.36 168,124.33C165.62,124.28 163.28,123.04 160.98,124.2C160.63,124.34 160.34,124.61 160.19,124.96C160.11,125.24 160.4,125.53 160.57,125.68C161.51,126.42 162.65,126.84 163.83,126.88C165.1,126.94 166.37,126.43 167.58,126.09C168.83,125.69 170.16,125.64 171.44,125.93C172.38,126.15 173.34,126.78 173.4,127.85C173.47,128.83 172.82,129.71 172.17,130.34C171.29,131.2 170.23,131.83 169.06,132.2C167.82,132.6 166.39,132.38 165.15,132.12C163.91,131.85 162.62,131.38 161.32,131.16C161,131.11 160.68,131.01 160.39,130.87C160.06,130.66 159.71,130.49 159.34,130.37C159.03,130.27 159.04,130.65 159.01,130.9C158.94,131.51 159.66,131.91 160.05,132.2C160.45,132.5 160.82,132.87 161.23,133.12C161.72,133.39 162.23,133.62 162.76,133.81C163.79,134.25 164.86,134.67 165.65,135.52C166,135.94 166.23,136.45 166.31,136.99C166.4,137.53 166.33,138.09 166.12,138.59C165.32,140.7 162.49,140.6 160.75,139.88C159.68,139.44 158.8,138.64 158.26,137.62C157.54,136.33 157.21,134.9 156.04,133.96C155.85,134.19 155.73,134.46 155.69,134.75C155.65,135.04 155.69,135.34 155.81,135.6C156.2,136.5 156.73,137.33 157.39,138.05C158.54,139.49 160.4,141.28 160.28,143.31C160.27,143.43 160.23,143.54 160.15,143.64C160.08,143.73 159.98,143.8 159.86,143.84C158.78,144.13 157.63,144.05 156.6,143.6C155.78,143.12 155.14,142.37 154.78,141.49C154.07,139.99 153.78,138.13 152.78,136.78C152.81,137.26 152.93,137.73 153.13,138.16C153.45,139.06 153.43,140.04 153.1,140.94C152.64,142.32 151.43,143.39 149.99,142.52C149.23,141.98 148.62,141.26 148.23,140.41C147.77,139.5 147.53,138.49 147.52,137.47C147.52,136.2 147.77,134.94 148.26,133.77C145.66,135.41 141.6,136.29 140.35,132.77C139.3,129.78 143.53,130.53 145.72,129.98C145.38,129.93 145.05,129.9 144.71,129.89C143.78,129.82 142.85,129.81 141.92,129.67C140.2,129.4 138.67,128.39 138.7,126.47C138.7,124.81 140.55,125.12 141.63,125.42C142.51,125.63 144.04,126.23 145.03,125.79C143.07,124.89 140.89,123.9 139.95,121.88C139.52,120.95 139.21,119.5 139.66,118.56C140.04,117.77 140.99,117.99 141.6,118.27C143.26,119.06 144.37,120.66 145.97,121.58C146.35,121.8 146.75,121.98 147.17,122.1C147.33,122.16 147.49,122.21 147.65,122.23C147.71,122.24 147.77,122.24 147.83,122.23C147.85,122.19 147.85,122.16 147.83,122.12C147.79,121.88 147.7,121.64 147.58,121.43C147.34,120.93 147,120.5 146.56,120.17C145.71,119.53 144.73,119.11 143.94,118.38C143.09,117.57 142.54,116.49 142.39,115.32C142.12,114.24 142.19,113.11 142.59,112.08C143.06,111.06 144.03,110.76 145.07,110.94C147.99,111.47 147.91,114.78 148.95,116.92C149.24,117.49 149.61,118.01 150.05,118.46C150.22,118.67 150.71,119.25 151.01,119.22C151.18,119.19 151.18,118.29 151.17,118.12C151.16,117.39 150.96,116.67 150.59,116.04C149.65,114.38 148.08,113.07 147.73,111.1C147.5,109.81 147.78,108.02 149.11,107.41C150.53,106.78 152.05,108.1 152.63,109.33C153.35,110.84 152.99,112.83 154.21,114.08C154.46,113.75 154.64,113.38 154.74,112.98C154.83,112.58 154.84,112.16 154.76,111.75C154.56,110.46 154.25,109.18 153.85,107.93C153.45,106.72 153.3,105.44 153.43,104.17C153.54,103.58 153.82,103.02 154.22,102.57C154.62,102.11 155.13,101.78 155.71,101.59V101.59Z"
android:fillColor="#E6F3FA"
android:fillType="evenOdd"/>
<path
android:pathData="M102.48,116.79C102.67,115.67 103.06,114.6 103.63,113.62C103.67,113.55 103.71,113.5 103.77,113.45C103.83,113.41 103.89,113.38 103.96,113.36C104.03,113.34 104.11,113.34 104.18,113.35C104.25,113.36 104.32,113.39 104.38,113.43C105.69,114.23 106.96,115.11 108.34,115.8C108.8,116.08 109.31,116.28 109.84,116.38H110C110,116.38 110,116.38 110,116.35C110.01,116.24 110,116.12 109.97,116.01C109.53,113.93 107.78,112.48 107.22,110.47C106.93,109.35 106.93,108.18 107.22,107.06C107.51,105.91 108.27,105 108.16,103.75C108.11,103.3 108.64,103.12 108.98,103.26C110.88,104.18 113.23,104.85 114.59,106.6C115.79,108.11 115.7,110.03 115.47,111.85C115.35,112.73 115.29,113.61 115.3,114.49C115.3,115 115.37,115.88 115.94,116.02C116.51,116.16 116.71,115.17 116.83,114.68C117.05,113.68 117.21,112.67 117.3,111.66C117.51,109.99 117.87,107.43 119.7,106.8C120.51,106.5 121.23,107.1 121.65,107.73C122.32,108.73 122.45,110.15 122.45,111.31C122.45,113.99 120.42,115.92 119.82,118.39C119.69,118.98 119.46,120.78 120.31,120.99C120.6,121.07 121.01,120.74 121.21,120.58C121.75,120.16 122.17,119.61 122.45,118.99C123.39,116.7 122.69,114.06 123.75,111.76C124.25,110.67 125.17,109.82 126.29,109.4C126.71,109.3 127.16,109.34 127.56,109.52C127.95,109.7 128.27,110.01 128.47,110.4C128.99,111.36 129.23,112.44 129.16,113.52C129.15,114.72 128.83,115.9 128.23,116.93C127.03,119.01 124.83,120.46 124.72,123.05C124.68,123.43 124.77,123.81 124.99,124.11C125.2,124.32 125.58,124.19 125.81,124.11C126.9,123.65 127.82,122.86 128.44,121.83C129.11,120.75 129.27,119.38 129.57,118.14C129.82,116.85 130.41,115.65 131.28,114.67C131.94,113.95 132.96,113.42 133.91,113.85C134.78,114.28 135.22,115.28 135.48,116.15C135.79,117.34 135.83,118.59 135.58,119.8C135.34,121.08 134.46,122.26 133.63,123.2C132.79,124.15 131.76,125.07 130.92,126.1C130.73,126.36 130.5,126.59 130.24,126.79C129.9,126.98 129.59,127.2 129.3,127.45C129.07,127.67 129.41,127.86 129.63,128.01C130.12,128.36 130.81,127.92 131.28,127.7C131.75,127.49 132.21,127.35 132.63,127.1C133.1,126.8 133.56,126.46 133.99,126.1C134.86,125.4 135.76,124.65 136.87,124.38C137.41,124.28 137.96,124.32 138.47,124.51C138.98,124.69 139.43,125.01 139.77,125.44C141.24,127.18 139.77,129.62 138.29,130.8C137.39,131.52 136.27,131.9 135.11,131.88C133.64,131.92 132.24,131.5 130.87,132.09C130.97,132.36 131.15,132.6 131.39,132.77C131.62,132.95 131.9,133.05 132.18,133.08C133.15,133.18 134.13,133.1 135.07,132.86C136.88,132.56 139.35,131.8 141.04,132.86C141.14,132.93 141.22,133.02 141.27,133.13C141.31,133.25 141.32,133.37 141.29,133.49C141.04,134.59 140.42,135.57 139.52,136.26C138.7,136.74 137.74,136.94 136.79,136.82C135.13,136.73 133.39,136.08 131.72,136.29C132.15,136.51 132.62,136.62 133.1,136.64C134.03,136.79 134.88,137.28 135.49,138.01C136.48,139.09 136.82,140.68 135.39,141.53C134.54,141.94 133.61,142.12 132.68,142.06C131.67,142.01 130.68,141.73 129.79,141.26C128.69,140.65 127.72,139.82 126.94,138.82C127.1,141.9 125.89,145.92 122.22,145.3C119.07,144.78 121.82,141.42 122.39,139.23C122.18,139.52 122,139.8 121.82,140.08C121.32,140.87 120.86,141.66 120.29,142.43C119.24,143.82 117.62,144.68 115.95,143.73C114.5,142.88 115.67,141.43 116.43,140.61C117.04,139.95 118.31,138.88 118.41,137.82C116.69,139.1 114.74,140.54 112.54,140.39C111.54,140.33 110.13,139.89 109.52,139.02C109.02,138.32 109.66,137.59 110.21,137.19C111.7,136.13 113.64,135.93 115.19,134.95C115.56,134.71 115.91,134.45 116.24,134.15C116.36,134.04 116.47,133.92 116.58,133.79C116.61,133.73 116.64,133.66 116.66,133.6C116.66,133.6 116.61,133.57 116.58,133.57C116.33,133.49 116.08,133.45 115.83,133.44C115.29,133.41 114.75,133.51 114.26,133.74C113.27,134.17 112.42,134.83 111.42,135.2C110.3,135.58 109.08,135.55 107.98,135.14C106.92,134.84 105.97,134.23 105.25,133.4C104.6,132.48 104.8,131.49 105.47,130.66C107.34,128.35 110.19,130.01 112.54,130.13C113.18,130.14 113.82,130.07 114.43,129.91C114.68,129.85 115.42,129.71 115.53,129.42C115.6,129.25 114.81,128.84 114.66,128.75C114.01,128.41 113.29,128.25 112.56,128.28C110.65,128.28 108.76,129.03 106.88,128.4C105.65,127.96 104.25,126.86 104.36,125.4C104.49,123.84 106.37,123.15 107.71,123.23C109.39,123.32 110.95,124.6 112.64,124.14C112.48,123.76 112.24,123.43 111.94,123.16C111.64,122.88 111.28,122.68 110.9,122.55C109.67,122.11 108.4,121.75 107.12,121.5C105.87,121.27 104.69,120.78 103.64,120.05C103.17,119.66 102.82,119.15 102.61,118.58C102.41,118 102.36,117.38 102.48,116.79V116.79Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M110.58,106.1C111.22,108.88 111.76,111.68 112.56,114.41C113.35,117.19 114.55,119.84 116.13,122.26C119.42,127.32 123.61,131.69 126.99,136.68C127.05,136.76 127.08,136.86 127.08,136.96C127.08,137.06 127.05,137.15 126.99,137.23C127.61,138.5 128.04,139.85 128.29,141.24C128.72,143.6 128.96,146 129.01,148.4C129.12,151.32 129.1,154.24 128.97,157.16C128.81,160.59 128.58,164.03 128.73,167.47C128.73,167.69 128.73,167.88 128.76,168.08C128.8,168.79 127.71,168.79 127.66,168.08C127.54,164.72 127.59,161.35 127.83,157.99C127.97,155.01 128.04,152.04 127.93,149.02C127.89,146.7 127.7,144.38 127.34,142.09C126.98,140.02 126.41,137.66 124.86,136.15C124.76,136.06 124.71,135.94 124.69,135.81C124.68,135.68 124.72,135.56 124.79,135.46C121.64,131.13 117.97,127.15 115.06,122.65C113.52,120.24 112.34,117.61 111.54,114.86C110.71,112.08 110.16,109.22 109.52,106.39C109.36,105.71 110.42,105.41 110.58,106.1Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M128.49,168.25C129.09,162.88 131.54,158.06 134.09,153.41C136.64,148.75 139.27,144.07 140.04,138.78C140.14,138.07 141.2,138.37 141.09,139.06C139.54,149.65 130.77,157.54 129.58,168.25C129.51,168.94 128.41,168.94 128.49,168.25Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M112.36,143.09C117.06,145.15 121.66,148.31 124.81,152.41C126.45,154.63 127.6,157.18 128.18,159.89C128.46,157.1 128.89,154.32 129.46,151.58C130.71,145.19 131.64,138.74 132.24,132.26C132.48,129.68 132.65,127.1 132.77,124.51C132.8,123.8 133.9,123.8 133.87,124.51C133.51,131.68 132.75,138.83 131.61,145.92C130.86,150.73 129.59,155.47 129.23,160.32C129.64,157.7 130.26,155.12 131.06,152.59C132.19,148.96 133.77,145.48 135.76,142.25C135.75,142.18 135.76,142.1 135.79,142.02C135.81,141.95 135.85,141.88 135.9,141.82C136.04,141.69 136.17,141.53 136.31,141.37C136.8,140.62 137.33,139.89 137.88,139.17C137.93,139.1 137.99,139.06 138.07,139.02C138.14,138.99 138.22,138.98 138.29,138.99C138.37,138.99 138.45,139.02 138.51,139.06C138.58,139.1 138.63,139.16 138.67,139.23C139.51,138.57 140.42,137.99 141.37,137.5C143.62,136.34 146.43,135.57 147.52,132.98C147.79,132.34 148.74,132.9 148.46,133.55C147.39,136.12 144.79,137.06 142.47,138.18C140.46,139.15 138.65,140.48 137.13,142.13C134.97,145.51 133.27,149.18 132.08,153.03C130.59,157.67 129.8,162.51 129.76,167.39V167.48C129.78,167.56 129.77,167.63 129.75,167.71C129.73,167.79 129.7,167.85 129.65,167.91C129.6,167.97 129.53,168.02 129.46,168.05C129.39,168.08 129.32,168.1 129.24,168.1C129.09,168.6 128.19,168.52 128.15,167.89C127.75,162.67 127.17,157.19 123.84,152.93C120.77,149 116.31,146 111.79,144.01C111.15,143.75 111.71,142.78 112.36,143.09Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M145.2,105.99C146.22,105.52 147.32,105.23 148.44,105.14C148.51,105.13 148.59,105.14 148.65,105.16C148.72,105.19 148.79,105.22 148.84,105.28C148.9,105.32 148.94,105.39 148.97,105.45C149,105.52 149.01,105.59 149.01,105.67C149.09,107.21 149.11,108.76 149.31,110.31C149.35,110.84 149.47,111.37 149.68,111.86C149.68,111.86 149.76,111.97 149.79,112.01C149.9,111.95 149.99,111.87 150.07,111.77C151.51,110.24 151.71,107.96 153.04,106.36C153.8,105.49 154.76,104.82 155.85,104.42C156.96,104.03 158.13,104.16 159.09,103.34C159.44,103.05 159.89,103.39 159.95,103.75C160.28,105.86 161.04,108.18 160.4,110.29C159.84,112.15 158.21,113.15 156.6,113.99C155.8,114.38 155.04,114.84 154.32,115.35C153.93,115.64 153.24,116.17 153.43,116.74C153.63,117.31 154.57,116.9 155.04,116.74C155.97,116.36 156.88,115.92 157.77,115.43C159.25,114.65 161.57,113.5 163.12,114.65C163.81,115.18 163.74,116.09 163.46,116.76C163.01,117.89 161.92,118.81 160.96,119.47C158.77,120.96 156.04,120.38 153.68,121.31C153.15,121.51 151.52,122.36 151.84,123.18C151.95,123.46 152.44,123.62 152.69,123.68C153.33,123.9 154.01,123.94 154.68,123.82C157.1,123.3 158.88,121.22 161.36,120.79C162.54,120.6 163.75,120.88 164.73,121.58C165.05,121.87 165.26,122.26 165.34,122.69C165.41,123.12 165.34,123.57 165.14,123.95C164.65,124.93 163.9,125.74 162.96,126.3C161.98,126.96 160.84,127.36 159.65,127.46C157.27,127.62 154.84,126.62 152.65,127.99C152.31,128.15 152.05,128.45 151.92,128.81C151.88,129.09 152.2,129.33 152.38,129.48C153.38,130.14 154.55,130.45 155.74,130.36C157.01,130.3 158.23,129.67 159.41,129.22C160.62,128.71 161.94,128.53 163.24,128.69C164.2,128.85 165.21,129.38 165.38,130.42C165.56,131.46 164.97,132.32 164.39,133.03C163.59,133.97 162.59,134.7 161.46,135.17C160.28,135.7 158.84,135.63 157.57,135.49C156.31,135.34 154.97,134.96 153.66,134.89C153.34,134.88 153.02,134.81 152.72,134.68C152.38,134.52 152.03,134.39 151.67,134.29C151.34,134.23 151.39,134.62 151.38,134.87C151.38,135.49 152.13,135.82 152.58,136.08C153.03,136.35 153.39,136.65 153.83,136.87C154.34,137.09 154.87,137.26 155.4,137.4C156.45,137.73 157.6,138.06 158.44,138.81C158.82,139.2 159.1,139.68 159.24,140.21C159.37,140.75 159.36,141.3 159.21,141.83C158.61,144.03 155.78,144.19 153.99,143.66C152.89,143.3 151.94,142.58 151.29,141.61C150.45,140.4 149.99,139.01 148.72,138.21C148.56,138.46 148.47,138.74 148.46,139.03C148.45,139.32 148.52,139.61 148.66,139.87C149.13,140.72 149.74,141.49 150.46,142.15C151.74,143.47 153.77,145.07 153.84,147.08C153.85,147.21 153.82,147.33 153.76,147.43C153.69,147.54 153.59,147.61 153.47,147.65C152.43,148.06 151.28,148.09 150.21,147.74C149.35,147.33 148.64,146.65 148.19,145.8C147.34,144.38 146.87,142.55 145.75,141.3C145.82,141.77 145.98,142.24 146.23,142.65C146.63,143.51 146.71,144.5 146.46,145.42C146.14,146.84 145.04,148.03 143.52,147.31C142.71,146.85 142.04,146.17 141.58,145.36C141.03,144.5 140.69,143.53 140.59,142.52C140.46,141.26 140.59,139.99 140.97,138.78C138.53,140.64 134.57,141.92 133,138.54C131.64,135.67 135.94,136.01 138.07,135.25C137.73,135.23 137.4,135.23 137.06,135.25C136.13,135.29 135.19,135.35 134.26,135.3C132.52,135.21 130.91,134.38 130.75,132.42C130.6,130.78 132.46,130.91 133.56,131.07C134.45,131.23 136.04,131.67 136.98,131.13C134.95,130.44 132.68,129.66 131.55,127.74C131.02,126.86 130.59,125.44 130.95,124.45C131.24,123.63 132.22,123.76 132.86,123.99C134.58,124.62 135.84,126.11 137.51,126.86C137.91,127.02 138.33,127.16 138.75,127.26C138.92,127.3 139.1,127.32 139.28,127.33C139.34,127.32 139.4,127.32 139.46,127.29C139.46,127.26 139.46,127.23 139.46,127.2C139.38,126.97 139.28,126.74 139.14,126.54C138.86,126.06 138.47,125.66 138,125.38C137.09,124.81 136.07,124.48 135.2,123.87C134.26,123.14 133.6,122.12 133.3,120.97C132.94,119.93 132.9,118.8 133.2,117.73C133.57,116.68 134.49,116.27 135.56,116.35C138.51,116.6 138.76,119.9 139.99,121.93C140.33,122.47 140.75,122.95 141.24,123.36C141.42,123.55 141.96,124.09 142.26,124.01C142.43,123.96 142.33,123.08 142.32,122.91C142.23,122.18 141.96,121.49 141.54,120.89C140.45,119.31 138.75,118.17 138.22,116.25C137.86,115 137.97,113.2 139.24,112.48C140.51,111.75 142.23,112.86 142.91,114.02C143.78,115.46 143.61,117.48 144.95,118.61C145.16,118.27 145.31,117.89 145.37,117.49C145.42,117.08 145.39,116.67 145.28,116.28C144.95,115 144.52,113.75 144,112.54C143.48,111.38 143.21,110.12 143.22,108.84C143.26,108.23 143.47,107.64 143.82,107.14C144.17,106.64 144.65,106.24 145.2,105.99Z"
android:fillColor="#EBEBEB"
android:fillType="evenOdd"/>
<path
android:pathData="M116.03,200.69H139.71L147.46,169.9H108.82L116.03,200.69Z"
android:fillColor="#EBEBEB"
android:fillType="evenOdd"/>
<path
android:pathData="M106.78,165.89H150.03V169.9H106.78V165.89Z"
android:fillColor="#B8B8B8"/>
<path
android:pathData="M128.14,169.9H147.46L139.71,200.69H128.14V169.9Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M116.03,201.16H139.71L147.46,197.01H108.82L116.03,201.16Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M128.14,197.01H147.46L139.71,201.16H128.14V197.01Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M128.13,165.89H150.03V169.9H128.13V165.89Z"
android:fillColor="#B8B8B8"/>
<path
android:pathData="M158.92,200.03C166.02,199.92 171.34,199.83 173.79,199.05C176.42,198.21 175.89,196.59 174.37,193.99C167.67,197.09 169.46,193.35 166.32,193.82C164.12,195.61 160.86,196.8 156.54,197.41C154.72,198.76 155.46,199.97 158.92,200.03Z"
android:fillColor="#012348"
android:fillType="evenOdd"/>
<path
android:pathData="M168.04,91.1H211.96C212.41,91.12 212.85,91.29 213.2,91.57C213.56,91.85 213.82,92.24 213.94,92.68L221.76,122.61C221.82,122.79 221.84,122.99 221.81,123.18C221.79,123.38 221.71,123.56 221.6,123.71C221.48,123.87 221.33,124 221.16,124.08C220.98,124.17 220.79,124.2 220.6,124.19H176.69C176.23,124.17 175.8,124 175.44,123.72C175.09,123.44 174.83,123.05 174.7,122.61L166.88,92.68C166.82,92.5 166.8,92.3 166.83,92.11C166.86,91.92 166.93,91.74 167.05,91.58C167.16,91.42 167.31,91.3 167.49,91.21C167.66,91.13 167.85,91.09 168.04,91.1V91.1Z"
android:fillColor="#E6F3FA"
android:fillType="evenOdd"/>
<path
android:pathData="M214.88,91.96L220.19,112.28C226.56,109.15 234.23,104.14 242.28,97.7C242.43,95.38 242.7,93.06 243.08,90.77C242.43,89.48 241.73,88.13 240.98,86.63C248.41,86.59 252.94,84.99 254.57,81.82C252.4,75.58 249.61,69.57 246.23,63.9C243.74,60.19 238.85,58.01 231.57,57.35C230.72,67.17 215.75,66.67 219.27,58.22C214.01,59.58 209.23,62.4 205.47,66.35C202.19,74.39 200.21,80 199.51,83.19C203.03,85.67 206.37,87.27 209.52,88C209.68,88.79 209.79,89.58 209.86,90.38H212.89C213.35,90.4 213.78,90.57 214.14,90.85C214.49,91.13 214.76,91.52 214.88,91.96Z"
android:fillColor="#007EA7"
android:fillType="evenOdd"/>
<path
android:pathData="M220.19,112.28L214.88,91.96C214.76,91.52 214.5,91.13 214.14,90.85C213.79,90.56 213.35,90.4 212.9,90.37H168.99C168.12,90.37 166.58,91.5 166.84,92.36C166.82,92.19 166.84,92.03 166.9,91.87C166.95,91.71 167.04,91.57 167.15,91.45C167.27,91.33 167.41,91.23 167.56,91.17C167.71,91.11 167.88,91.08 168.04,91.09H211.96C212.41,91.12 212.85,91.28 213.2,91.57C213.56,91.85 213.82,92.24 213.94,92.68L221.76,122.61C221.83,122.82 221.84,123.06 221.78,123.29C221.73,123.51 221.61,123.72 221.45,123.88C222.16,123.41 222.86,122.5 222.7,121.89L220.19,112.28Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M220.6,124.19H176.69C176.52,124.19 176.36,124.17 176.2,124.12C177.08,126.4 179.45,126.06 180.38,126.06H232.44C235.26,125.94 235.19,123.95 235.23,122.03H222.72C222.76,122.64 222.12,123.45 221.45,123.88C221.21,124.09 220.91,124.2 220.6,124.19V124.19Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M214.45,103.41C209.73,105.8 204.17,106.53 198.45,106.83C198.51,107.04 198.56,107.25 198.6,107.47C198.7,108.02 198.68,108.59 198.54,109.14C198.4,109.69 198.14,110.19 197.77,110.62C197.41,111.05 196.96,111.4 196.45,111.63C195.94,111.86 195.38,111.98 194.82,111.96C193.67,111.93 192.57,111.5 191.7,110.75C190.83,110 190.24,108.96 190.05,107.82C190.01,107.58 189.99,107.33 189.99,107.09C184.05,107.25 178.31,107.58 173.56,109.45L176.82,121.96H219.29L214.45,103.41Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M193.87,104.78C194.66,104.81 195.42,105.1 196.02,105.63C196.63,106.15 197.03,106.86 197.17,107.65C197.24,108 197.24,108.36 197.15,108.71C197.06,109.06 196.9,109.39 196.67,109.66C196.44,109.94 196.15,110.16 195.82,110.3C195.49,110.45 195.14,110.52 194.78,110.51C193.99,110.49 193.23,110.19 192.63,109.67C192.03,109.15 191.62,108.43 191.48,107.65C191.41,107.3 191.42,106.93 191.51,106.58C191.59,106.24 191.76,105.91 191.99,105.64C192.22,105.36 192.51,105.14 192.83,104.99C193.16,104.84 193.51,104.77 193.87,104.78V104.78Z"
android:fillColor="#012348"
android:fillType="evenOdd"/>
<path
android:pathData="M244.39,116.9C243.51,114.18 242.88,111.38 242.5,108.54C236.59,110.84 229.83,113.07 221.28,116.46L222.43,120.88C235.35,121.31 242.67,119.99 244.39,116.9Z"
android:fillColor="#007EA7"
android:fillType="evenOdd"/>
<path
android:pathData="M221.28,116.46C229.83,113.07 236.59,110.84 242.5,108.54C247.72,106.51 252.27,104.42 256.8,101.4C256.66,95.25 255.5,89.16 253.35,83.4C251.16,85.51 247.02,86.59 240.96,86.63C242.71,89.98 244.14,92.85 245.25,95.27C236.13,102.88 227.34,108.77 220.19,112.28L221.28,116.46Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M200.65,83.96C199.99,86.28 199.38,88.41 198.82,90.38H209.84C209.77,89.58 209.66,88.79 209.51,88C206.34,87.19 203.35,85.82 200.65,83.96V83.96Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M173.84,191.63C180.37,167.8 182.71,151.06 180.85,141.42C184.55,141.95 188.3,142.11 192.03,141.92C191.46,139.34 190.89,136.75 190.31,134.14C190.37,130.59 192.18,127.95 198.58,126.06H180.38C179.76,126.06 178.5,126.21 177.47,125.64C171.6,127.32 168.74,130.1 167.76,133.5C167.05,142.85 168.98,153.5 167.33,191.71C169.5,191.92 171.68,191.89 173.84,191.63Z"
android:fillColor="#012348"
android:fillType="evenOdd"/>
<path
android:pathData="M180.67,126.06H180.38C179.76,126.06 178.5,126.21 177.47,125.64C171.6,127.32 168.74,130.1 167.76,133.5C167.05,142.85 168.98,153.5 167.33,191.71C168.59,191.83 169.86,191.88 171.13,191.83C174.5,178.55 182.53,145.98 173.49,131.93C175.62,129.67 178.03,127.69 180.67,126.06Z"
android:fillColor="#1B3C59"
android:fillType="evenOdd"/>
<path
android:pathData="M231.53,57.46C230.37,55.97 229.34,54.58 229.04,53.6C229.28,52.93 229.52,52.08 229.78,51.05C234.14,48.08 234.74,45.87 231.57,44.44C230.93,44.8 230.14,45.91 229.19,47.77C228.82,47.76 228.47,47.64 228.16,47.44C227.86,47.23 227.62,46.94 227.47,46.6C228.23,44.1 228.82,41.55 229.23,38.97C227.08,35.75 222.06,35.27 215.41,36.16C215.1,37.94 214.85,39.83 214.65,41.82C213.47,42.91 213.6,46.95 214.71,51.6C214.17,54.25 215.79,55.7 219.58,55.94C219.58,56.71 219.46,57.48 219.25,58.22V58.22V58.25C215.78,66.64 230.6,67.16 231.53,57.46Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M215.42,36.16C222.07,35.29 227.1,35.75 229.24,38.97C228.83,41.55 228.24,44.1 227.48,46.6C227.63,46.94 227.87,47.23 228.17,47.44C228.48,47.64 228.83,47.76 229.2,47.77C230.15,45.91 230.95,44.8 231.58,44.44C234.73,45.87 234.13,48.08 229.79,51.05C229.53,52.08 229.29,52.93 229.05,53.6C232.97,52.72 236.26,49.19 236.72,47.66C241.29,38.6 236.19,34.76 233.46,33.37C232.26,24.39 219.29,32.31 212.79,28C210.22,31.58 213.41,36.1 215.42,36.16Z"
android:fillColor="#012348"
android:fillType="evenOdd"/>
<path
android:pathData="M224.52,55.82C222.88,55.97 221.24,56.01 219.59,55.94C219.6,56.57 219.52,57.21 219.36,57.82C221.71,57.77 223.43,57.11 224.52,55.82Z"
android:fillColor="#B8B8B8"
android:fillType="evenOdd"/>
<path
android:pathData="M204.43,140.22H244.05C245.47,140.22 246.62,141.38 246.62,142.81V142.82C246.62,144.25 245.47,145.4 244.05,145.4H204.43C203.01,145.4 201.86,144.25 201.86,142.82V142.81C201.86,141.38 203.01,140.22 204.43,140.22Z"
android:fillColor="#1B3C59"/>
<path
android:pathData="M241.69,189.28C240.72,188.3 239.57,187.52 238.3,186.99C237.03,186.46 235.67,186.19 234.3,186.19H214.21C211.43,186.19 208.76,187.3 206.8,189.27C204.83,191.24 203.72,193.92 203.71,196.71V198.82H202.9V201.46H208.86V198.82H208.05V196.71C208.06,195.07 208.71,193.51 209.86,192.35C211.02,191.19 212.58,190.54 214.21,190.54H234.3C235.93,190.54 237.49,191.19 238.64,192.35C239.79,193.51 240.45,195.07 240.46,196.71V198.82H239.65V201.46H245.56V198.82H244.76V196.71C244.76,195.33 244.48,193.96 243.96,192.69C243.43,191.41 242.66,190.26 241.69,189.28V189.28Z"
android:fillColor="#007EA7"
android:fillType="evenOdd"/>
<path
android:pathData="M222.08,145.4H226.4V186.19H222.08V145.4Z"
android:fillColor="#007EA7"/>
<path
android:pathData="M57.77,140.22H97.39C98.81,140.22 99.96,141.38 99.96,142.81V142.82C99.96,144.25 98.81,145.4 97.39,145.4H57.77C56.35,145.4 55.2,144.25 55.2,142.82V142.81C55.2,141.38 56.35,140.22 57.77,140.22Z"
android:fillColor="#1B3C59"/>
<path
android:pathData="M95.04,189.28C94.07,188.3 92.92,187.52 91.65,186.99C90.38,186.46 89.02,186.19 87.64,186.19H67.53C64.76,186.2 62.11,187.32 60.15,189.29C58.19,191.26 57.09,193.93 57.08,196.71V198.82H56.27V201.46H62.19V198.82H61.39V196.71C61.39,195.08 62.04,193.51 63.19,192.36C64.34,191.2 65.9,190.55 67.52,190.54H87.63C89.26,190.55 90.82,191.2 91.96,192.36C93.11,193.51 93.76,195.08 93.77,196.71V198.82H92.94V201.46H98.9V198.82H98.09V196.71C98.09,195.33 97.82,193.97 97.3,192.69C96.78,191.42 96.01,190.26 95.04,189.28V189.28Z"
android:fillColor="#007EA7"
android:fillType="evenOdd"/>
<path
android:pathData="M75.42,145.4H79.74V186.19H75.42V145.4Z"
android:fillColor="#007EA7"/>
<path
android:pathData="M238.1,140.07C245.76,137.3 246.8,129.62 243.43,118.02C240.66,120.3 233.66,121.26 222.43,120.88L222.7,121.89C222.7,121.94 222.7,121.98 222.7,122.03H235.21C235.17,123.95 235.24,125.94 232.42,126.06H198.56C192.16,127.95 190.35,130.59 190.29,134.14C194.34,152.35 197.94,169.06 202.86,192.14C204.51,193.07 206.77,193 209.65,191.92C211.95,169.54 211.32,153.26 207.76,143.09C217.25,143.13 227.33,141.83 238.1,140.07Z"
android:fillColor="#1B3C59"
android:fillType="evenOdd"/>
<path
android:pathData="M238.1,140.07C245.76,137.3 246.8,129.62 243.43,118.02C242.73,118.57 241.93,119 241.09,119.29C243.88,131.21 240.85,137.75 231.85,138.38C221.35,139.94 212.64,140.69 205.72,140.63C208.77,160.5 209.29,177.83 207.29,192.61C208.1,192.45 208.9,192.22 209.68,191.92C211.98,169.54 211.35,153.26 207.78,143.09C217.25,143.13 227.33,141.83 238.1,140.07Z"
android:fillColor="#012348"
android:fillType="evenOdd"/>
<path
android:pathData="M168.01,191.77C167.81,192.49 167.5,193.17 167.08,193.79C169.13,193.99 168.34,196.64 173.88,194.21C173.62,193.39 173.49,192.53 173.48,191.67C171.66,191.87 169.83,191.9 168.01,191.77Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M202.89,204.22C206.67,202.63 207.23,200.1 209.31,199.13C211.39,198.15 211.63,196.4 209.59,194.49C208.09,195.71 206.21,197.2 205.22,196.41C204.56,195.88 202.31,195.91 201.87,196.69C199.91,201.26 197.19,199.81 196.66,201.89C196.59,204.66 200.52,205.2 202.89,204.22Z"
android:fillColor="#012348"
android:fillType="evenOdd"/>
<path
android:pathData="M203.54,192.42C203.57,193.66 203.4,194.9 203.04,196.08C203.85,195.96 204.82,196.08 205.22,196.39C206.14,197.12 207.81,195.89 209.26,194.75C208.99,193.93 208.83,193.07 208.78,192.21C206.67,192.89 204.93,192.96 203.54,192.42Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
<path
android:pathData="M240.98,86.63C239.77,84.33 238.74,81.93 237.88,79.47C238.47,82.97 238.44,85.48 239.38,88.36C238.62,92.44 238.28,96.59 238.36,100.74C239.65,99.77 240.96,98.75 242.27,97.7C242.43,95.38 242.7,93.06 243.08,90.77C242.43,89.48 241.73,88.13 240.98,86.63ZM207.28,87.34C208.02,87.6 208.78,87.83 209.55,88C209.27,83.56 209.08,79.89 208.99,76.98C208.14,81.27 207.57,84.72 207.28,87.34ZM244.39,116.9C243.51,114.18 242.88,111.38 242.5,108.54C241.41,108.96 240.28,109.39 239.13,109.82C239.6,113.01 240.26,116.18 241.1,119.29C242.77,118.67 243.87,117.87 244.39,116.9Z"
android:fillColor="#195D80"
android:fillType="evenOdd"/>
</group>
</vector>

View File

@ -9,7 +9,7 @@
<LinearLayout <LinearLayout
android:id="@+id/root_lay" android:id="@+id/root_lay"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_margin="4dp" android:layout_margin="4dp"
android:orientation="vertical" android:orientation="vertical"
@ -51,12 +51,26 @@
</LinearLayout> </LinearLayout>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginVertical="16dp" android:layout_marginVertical="16dp"
android:background="#E0E0E0" /> android:background="#E0E0E0" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:id="@+id/list_lay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<RelativeLayout <RelativeLayout
android:id="@+id/first_row" android:id="@+id/first_row"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -98,7 +112,7 @@
android:maxLines="2" android:maxLines="2"
android:text=" تحلیل شکاف فناوری صنعت فولاد ایران تحلیل شکاف فناوری صنعت فولاد ایران" android:text=" تحلیل شکاف فناوری صنعت فولاد ایران تحلیل شکاف فناوری صنعت فولاد ایران"
android:textColor="#012348" android:textColor="#012348"
android:textSize="14sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<RelativeLayout <RelativeLayout
@ -184,7 +198,7 @@
android:maxLines="2" android:maxLines="2"
android:text=" تحلیل شکاف فناوری صنعت فولاد ایران تحلیل شکاف فناوری صنعت فولاد ایران" android:text=" تحلیل شکاف فناوری صنعت فولاد ایران تحلیل شکاف فناوری صنعت فولاد ایران"
android:textColor="#012348" android:textColor="#012348"
android:textSize="14sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<RelativeLayout <RelativeLayout
@ -271,7 +285,7 @@
android:maxLines="2" android:maxLines="2"
android:text=" تحلیل شکاف فناوری صنعت فولاد ایران تحلیل شکاف فناوری صنعت فولاد ایران" android:text=" تحلیل شکاف فناوری صنعت فولاد ایران تحلیل شکاف فناوری صنعت فولاد ایران"
android:textColor="#012348" android:textColor="#012348"
android:textSize="14sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<RelativeLayout <RelativeLayout
@ -313,6 +327,43 @@
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical"
android:id="@+id/empty_lay"
android:visibility="visible"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/chat_light"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="شما وارد نشدید!!\nبرای ورود به برنامه کلیک کنید"
android:textColor="#012348"
android:textSize="20sp"
android:textStyle="bold"
android:gravity="center"
/>
</LinearLayout>
</RelativeLayout>
</LinearLayout> </LinearLayout>

View File

@ -6,10 +6,9 @@ import 'package:didvan/providers/theme.dart';
import 'package:didvan/providers/user.dart'; import 'package:didvan/providers/user.dart';
import 'package:didvan/routes/route_generator.dart'; import 'package:didvan/routes/route_generator.dart';
import 'package:didvan/routes/routes.dart'; import 'package:didvan/routes/routes.dart';
import 'package:didvan/services/network/request.dart'; import 'package:didvan/services/app_home_widget/home_widget_repository.dart';
import 'package:didvan/services/notification/awsome/awsome_notification_handler.dart'; import 'package:didvan/services/notification/awsome/awsome_notification_handler.dart';
import 'package:didvan/services/notification/fcm/firebase_notification_handler.dart'; import 'package:didvan/services/notification/fcm/firebase_notification_handler.dart';
import 'package:didvan/utils/action_sheet.dart';
import 'package:didvan/views/podcasts/podcasts_state.dart'; import 'package:didvan/views/podcasts/podcasts_state.dart';
import 'package:didvan/views/podcasts/studio_details/studio_details_state.dart'; import 'package:didvan/views/podcasts/studio_details/studio_details_state.dart';
import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core/firebase_core.dart';
@ -19,12 +18,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:home_widget/home_widget.dart'; import 'package:home_widget/home_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher_string.dart';
import 'models/requests/infography.dart';
import 'models/requests/news.dart';
import 'models/requests/radar.dart';
import 'models/widget_response.dart';
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>(); final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
@ -48,9 +41,20 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
projectId: 'didvan-9b7da', projectId: 'didvan-9b7da',
), ),
); );
// AwsomeNotificationHandler().alarm();
AwsomeNotificationHandler().show(message); AwsomeNotificationHandler().show(message);
return;
}
@pragma('vm:entry-point')
Future<void> _backgroundCallbackHomeWidget(Uri? uri) async {
await HomeWidget.saveWidgetData("uri", uri!.host);
AndroidIntent intent = const AndroidIntent(
action: 'android.intent.action.RUN',
package: 'com.didvan.didvanapp',
componentName: 'com.didvan.didvanapp.MainActivity',
);
await intent.launch();
return;
} }
void main() async { void main() async {
@ -59,10 +63,9 @@ void main() async {
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler); FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
FirebaseMessaging.onMessage.listen( FirebaseMessaging.onMessage.listen(
(RemoteMessage message) => AwsomeNotificationHandler().show(message)); (RemoteMessage message) => AwsomeNotificationHandler().show(message));
//ignore: deprecated_member_use //ignore: deprecated_member_use
HomeWidget.registerBackgroundCallback(backgroundCallback); HomeWidget.registerBackgroundCallback(_backgroundCallbackHomeWidget);
HomeWidget.registerInteractivityCallback(backgroundCallback); HomeWidget.registerInteractivityCallback(_backgroundCallbackHomeWidget);
AwsomeNotificationHandler().alarm(); AwsomeNotificationHandler().alarm();
FirebaseNotificationHandler().initial(); FirebaseNotificationHandler().initial();
} catch (e) { } catch (e) {
@ -72,17 +75,6 @@ void main() async {
runApp(const Didvan()); runApp(const Didvan());
} }
Future<void> backgroundCallback(Uri? uri) async {
AndroidIntent intent = const AndroidIntent(
action: 'android.intent.action.RUN',
package: 'com.didvan.didvanapp',
componentName: 'com.didvan.didvanapp.MainActivity',
);
await intent.launch();
HomeWidget.saveWidgetData("uri", uri!.host);
}
class Didvan extends StatefulWidget { class Didvan extends StatefulWidget {
const Didvan({Key? key}) : super(key: key); const Didvan({Key? key}) : super(key: key);
@ -91,17 +83,20 @@ class Didvan extends StatefulWidget {
} }
class _DidvanState extends State<Didvan> with WidgetsBindingObserver { class _DidvanState extends State<Didvan> with WidgetsBindingObserver {
@override
void didChangeDependencies() {
super.didChangeDependencies();
}
@override @override
void initState() { void initState() {
super.initState(); super.initState();
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
} }
@override @override
void dispose() { void dispose() {
WidgetsBinding.instance.removeObserver(this); WidgetsBinding.instance.removeObserver(this);
super.dispose(); super.dispose();
} }
@ -109,122 +104,11 @@ class _DidvanState extends State<Didvan> with WidgetsBindingObserver {
@override @override
void didChangeAppLifecycleState(AppLifecycleState state) async { void didChangeAppLifecycleState(AppLifecycleState state) async {
HomeWidget.widgetClicked.listen((event) {
print("${event!.host}--------------------------------------------------------------");
});
if (state == AppLifecycleState.paused) {
b = false;
}
if (state == AppLifecycleState.resumed) { if (state == AppLifecycleState.resumed) {
var r = await HomeWidget.getWidgetData("cRoute", defaultValue: '');
await HomeWidget.getWidgetData<String>('uri', defaultValue: "") if (r!.toString() != Routes.splash) {
.then((value) async { await HomeWidgetRepository.decideWhereToGo();
if (value!.isNotEmpty) {
int row = 0;
String route = "";
dynamic args;
switch (value) {
case 'setting':
route = Routes.favouritesStep;
args = {"toTimer": false};
break;
case 'rowfirst':
row = 1;
break;
case 'rowmiddle':
row = 2;
break;
case 'rowlast':
row = 3;
break;
} }
if (row != 0) {
String? id = await HomeWidget.getWidgetData<String>("id$row",
defaultValue: "");
WidgetResponse data = WidgetResponse(
id: int.parse(id!),
title:
await HomeWidget.getWidgetData("title$row", defaultValue: ""),
createdAt: await HomeWidget.getWidgetData("createdAt$row",
defaultValue: ""),
type:
await HomeWidget.getWidgetData("type$row", defaultValue: ""),
link:
await HomeWidget.getWidgetData("link$row", defaultValue: ""),
category: await HomeWidget.getWidgetData("category$row",
defaultValue: ""),
image:
await HomeWidget.getWidgetData("image$row", defaultValue: ""),
);
if (data.link!.isEmpty) {
switch (data.type!) {
case "infography":
route = Routes.infography;
args = {
// 'onMarkChanged': (id, value) =>
// markChangeHandler(data.type, id, value),
'id': data.id,
'args': const InfographyRequestArgs(page: 0),
'hasUnmarkConfirmation': false,
};
break;
case "news":
route = Routes.newsDetails;
args = {
// 'onMarkChanged': (id, value) =>
// markChangeHandler(data.type, id, value),
'id': data.id,
'args': const NewsRequestArgs(page: 0),
'hasUnmarkConfirmation': false,
};
break;
case "radar":
route = Routes.radarDetails;
args = {
// 'onMarkChanged': (id, value) =>
// markChangeHandler(data.type, id, value),
'id': data.id,
'args': const RadarRequestArgs(page: 0),
'hasUnmarkConfirmation': false,
};
break;
case "video":
route = Routes.studioDetails;
args = {
'type': 'podcast',
'id': data.id,
};
break;
case "podcast":
route = Routes.podcasts;
args = {
'type': 'podcast',
'id': data.id,
};
break;
}
} else {
if (data.link!.startsWith('http')) {
launchUrlString(
'${data.link}',
mode: LaunchMode.inAppWebView,
);
}
}
}
if (route.isNotEmpty) {
!b ? ActionSheetUtils.showLogoLoadingIndicator() : null;
await Future.delayed(Duration(seconds: b ? 10 : 2), () {
!b ? ActionSheetUtils.pop() : null;
navigatorKey.currentState!.pushNamed(route, arguments: args);
});
}
}
});
HomeWidget.saveWidgetData("uri", "");
} }
} }

View File

@ -48,15 +48,17 @@ import 'package:didvan/views/splash/splash.dart';
import 'package:didvan/routes/routes.dart'; import 'package:didvan/routes/routes.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:home_widget/home_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../views/customize_category/notification_status_step.dart'; import '../views/customize_category/notification_status_step.dart';
import '../views/notification_time/notification_time.dart'; import '../views/notification_time/notification_time.dart';
class RouteGenerator { class RouteGenerator {
static Route<dynamic> generateRoute(RouteSettings settings) {
switch (settings.name) {
static Route<dynamic> generateRoute(RouteSettings settings) {
HomeWidget.saveWidgetData("cRoute", settings.name!);
switch (settings.name) {
case Routes.splash: case Routes.splash:
return _createRoute( return _createRoute(
const Splash(), const Splash(),

View File

@ -1,17 +1,23 @@
import 'package:flutter/cupertino.dart';
import 'package:home_widget/home_widget.dart'; import 'package:home_widget/home_widget.dart';
import 'package:persian_number_utility/persian_number_utility.dart'; import 'package:persian_number_utility/persian_number_utility.dart';
import 'package:url_launcher/url_launcher_string.dart';
import '../../main.dart';
import '../../models/requests/infography.dart';
import '../../models/requests/news.dart';
import '../../models/requests/radar.dart';
import '../../models/widget_response.dart'; import '../../models/widget_response.dart';
import '../../routes/routes.dart';
import '../network/request.dart'; import '../network/request.dart';
import '../network/request_helper.dart'; import '../network/request_helper.dart';
class HomeWidgetRepository { class HomeWidgetRepository {
Future<void> fetchWidget() async { static Future<void> fetchWidget() async {
final service = RequestService( final service = RequestService(
RequestHelper.widgetNews(), RequestHelper.widgetNews(),
); );
await service.httpGet(); await service.httpGet();
List<WidgetResponse> responseList = [];
if (service.isSuccess) { if (service.isSuccess) {
final favourites = service.data('content'); final favourites = service.data('content');
HomeWidget.saveWidgetData("token", RequestService.token.toString()); HomeWidget.saveWidgetData("token", RequestService.token.toString());
@ -40,4 +46,109 @@ class HomeWidgetRepository {
); );
} }
} }
static Future<void> decideWhereToGo() async {
String? uri =
await HomeWidget.getWidgetData<String>('uri', defaultValue: "");
if (uri!.isNotEmpty) {
int row = 0;
String route = "";
dynamic args;
switch (uri) {
case 'setting':
route = Routes.favouritesStep;
args = {"toTimer": false};
break;
case 'rowfirst':
row = 1;
break;
case 'rowmiddle':
row = 2;
break;
case 'rowlast':
row = 3;
break;
}
if (row != 0) {
String? id =
await HomeWidget.getWidgetData<String>("id$row", defaultValue: "");
WidgetResponse data = WidgetResponse(
id: int.parse(id!),
title: await HomeWidget.getWidgetData("title$row", defaultValue: ""),
createdAt:
await HomeWidget.getWidgetData("createdAt$row", defaultValue: ""),
type: await HomeWidget.getWidgetData("type$row", defaultValue: ""),
link: await HomeWidget.getWidgetData("link$row", defaultValue: ""),
category:
await HomeWidget.getWidgetData("category$row", defaultValue: ""),
image: await HomeWidget.getWidgetData("image$row", defaultValue: ""),
);
if (data.link!.startsWith('http')) {
launchUrlString(
'${data.link}',
mode: LaunchMode.inAppWebView,
);
return;
}
switch (data.type!) {
case "infography":
route = Routes.infography;
args = {
// 'onMarkChanged': (id, value) =>
// markChangeHandler(data.type, id, value),
'id': data.id,
'args': const InfographyRequestArgs(page: 0),
'hasUnmarkConfirmation': false,
};
break;
case "news":
route = Routes.newsDetails;
args = {
// 'onMarkChanged': (id, value) =>
// markChangeHandler(data.type, id, value),
'id': data.id,
'args': const NewsRequestArgs(page: 0),
'hasUnmarkConfirmation': false,
};
break;
case "radar":
route = Routes.radarDetails;
args = {
// 'onMarkChanged': (id, value) =>
// markChangeHandler(data.type, id, value),
'id': data.id,
'args': const RadarRequestArgs(page: 0),
'hasUnmarkConfirmation': false,
};
break;
case "video":
route = Routes.studioDetails;
args = {
'type': 'podcast',
'id': data.id,
};
break;
case "podcast":
route = Routes.podcasts;
args = {
'type': 'podcast',
'id': data.id,
};
break;
}
}
if (route.isNotEmpty) {
Future.delayed(
const Duration(milliseconds: 500),
() => Navigator.of(navigatorKey.currentContext!)
.pushNamed(route.toString(), arguments: args));
}
}
await HomeWidget.saveWidgetData("uri", "");
return;
}
} }

View File

@ -1,7 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:developer'; import 'dart:developer';
import 'package:didvan/services/storage/storage.dart'; import 'package:didvan/services/storage/storage.dart';
import 'package:home_widget/home_widget.dart';
// ignore: depend_on_referenced_packages // ignore: depend_on_referenced_packages
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;

View File

@ -7,7 +7,6 @@ import '../../../models/requests/infography.dart';
import '../../../models/requests/news.dart'; import '../../../models/requests/news.dart';
import '../../../models/requests/radar.dart'; import '../../../models/requests/radar.dart';
import '../../../routes/routes.dart'; import '../../../routes/routes.dart';
import '../../network/request.dart';
class NotificationController { class NotificationController {
/// Use this method to detect when a new notification or a schedule is created /// Use this method to detect when a new notification or a schedule is created
@ -90,6 +89,13 @@ class NotificationController {
'goToComment': openComments 'goToComment': openComments
}; };
break; break;
case "podcast":
route = Routes.podcasts;
args = {
'type': 'podcast',
'id': data.id,
};
break;
} }
} else { } else {
if (data.link!.startsWith('http')) { if (data.link!.startsWith('http')) {

View File

@ -12,7 +12,6 @@ import 'awsome_notification_controller.dart';
class AwsomeNotificationHandler { class AwsomeNotificationHandler {
alarm() async { alarm() async {
late ReceivedAction? initialAction;
AwesomeNotifications().initialize( AwesomeNotifications().initialize(
// set the icon to null if you want to use the default app icon // set the icon to null if you want to use the default app icon
@ -40,8 +39,6 @@ class AwsomeNotificationHandler {
// ], // ],
debug: true); debug: true);
initialAction = await AwesomeNotifications()
.getInitialNotificationAction(removeFromActionEvents: false);
AwesomeNotifications().setListeners( AwesomeNotifications().setListeners(
onActionReceivedMethod: NotificationController.onActionReceivedMethod, onActionReceivedMethod: NotificationController.onActionReceivedMethod,
@ -85,7 +82,7 @@ class AwsomeNotificationHandler {
break; break;
case "3": case "3":
await HomeWidgetRepository().fetchWidget(); await HomeWidgetRepository.fetchWidget();
break; break;
@ -162,9 +159,7 @@ class AwsomeNotificationHandler {
payload: message.toPayload(), payload: message.toPayload(),
notificationLayout: NotificationLayout.BigPicture, notificationLayout: NotificationLayout.BigPicture,
color: const Color(0xFF007EA7)), color: const Color(0xFF007EA7)),
schedule: time.year != null schedule: NotificationCalendar(
? null
: NotificationCalendar(
hour: time.hour, hour: time.hour,
minute: time.minute, minute: time.minute,
)); ));
@ -221,13 +216,13 @@ class AwsomeNotificationHandler {
if (time.toString().isNotEmpty) { if (time.toString().isNotEmpty) {
DateFormat format = DateFormat("HH:mm"); DateFormat format = DateFormat("HH:mm");
DateTime dateTime = format.parse(time); DateTime dateTime = format.parse(time);
result = DateTime.now() result = DateTime.now().copyWith(hour: dateTime.hour, minute: dateTime.minute);
.copyWith(hour: dateTime.hour, minute: dateTime.minute);
} }
return result; return result;
} }
}); });
return null;
} }
showNotificationScheduled(NotificationMessage message) async { showNotificationScheduled(NotificationMessage message) async {

View File

@ -1,4 +1,3 @@
import 'package:didvan/services/notification/awsome/awsome_notification_handler.dart';
import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -51,69 +50,11 @@ class FirebaseNotificationHandler {
debugPrint( debugPrint(
'User granted notifications permission: ${settings.authorizationStatus}'); 'User granted notifications permission: ${settings.authorizationStatus}');
// String? token = await FirebaseMessaging.instance.getToken();
// print("Firebase Token : ${token.toString()}");
// Handling background messages using the specified handler
// FirebaseMessaging.onBackgroundMessage(
// _firebaseMessagingBackgroundHandler);
// Listening for incoming messages while the app is in the foreground
// Handling the initial message received when the app is launched from dead (killed state)
// When the app is killed and a new notification arrives when user clicks on it
// It gets the data to which screen to open
// FirebaseMessaging.instance.getInitialMessage().then((message) {
// if (message != null) {
// _handleNotificationClick(message);
// }
// });
//
// // Handling a notification click event when the app is in the background
// FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
// _handleNotificationClick(message);
// });
} catch (e) { } catch (e) {
if (kDebugMode) {
print(e.toString()); print(e.toString());
} }
} }
// Handling a notification click event by navigating to the specified screen
void _handleNotificationClick(RemoteMessage message) {
final notificationData = message.data;
if (notificationData.containsKey('screen')) {
final screen = notificationData['screen'];
// Navigator.of(context).pushNamed(screen);
}
}
} }
// Handler for background messages }
// @pragma('vm:entry-point')
// Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
// await Firebase.initializeApp(
// options: kIsWeb
// ? const FirebaseOptions(
// apiKey: "AIzaSyA0HZjKpRuPOi1SC3f_EZTvlS3mcj9UVo0",
// authDomain: "didvan-9b7da.firebaseapp.com",
// projectId: "didvan-9b7da",
// storageBucket: "didvan-9b7da.appspot.com",
// messagingSenderId: "935017686266",
// appId: "1:935017686266:web:a93f7a19bed23c51d2d543",
// measurementId: "G-80B4H9E8Y0")
// : const FirebaseOptions(
// apiKey: 'AIzaSyBp-UHjWeM0H0UHtX5yguFKG-riMzvvCzw',
// appId: '1:935017686266:android:f9cbc9aba8e3d65ed2d543',
// messagingSenderId: '935017686266',
// projectId: 'didvan-9b7da',
// ),
// );
//
// LocalNotificationService.initialize();
// LocalNotificationService.display(message);
// // AwsomeNotificationHandler().main();
// // AwsomeNotificationHandler().show(message);
//
// return Future<void>.value();
// }

View File

@ -87,7 +87,7 @@ class CustomizeCategoryState extends CoreProvier {
Navigator.of(context).pushNamed(Routes.notificationStatusStep, Navigator.of(context).pushNamed(Routes.notificationStatusStep,
arguments: {"toTimer": toTimer}); arguments: {"toTimer": toTimer});
appState = AppState.idle; appState = AppState.idle;
await HomeWidgetRepository().fetchWidget(); await HomeWidgetRepository.fetchWidget();
return; return;
} }
@ -116,7 +116,7 @@ class CustomizeCategoryState extends CoreProvier {
} }
appState = AppState.idle; appState = AppState.idle;
await HomeWidgetRepository().fetchWidget(); await HomeWidgetRepository.fetchWidget();
return; return;
} }

View File

@ -11,7 +11,6 @@ import 'package:didvan/views/widgets/logo_app_bar.dart';
import 'package:didvan/views/widgets/didvan/bnb.dart'; import 'package:didvan/views/widgets/didvan/bnb.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../services/app_home_widget/home_widget_repository.dart'; import '../../services/app_home_widget/home_widget_repository.dart';
class Home extends StatefulWidget { class Home extends StatefulWidget {
@ -35,7 +34,8 @@ class _HomeState extends State<Home>
state.currentPageIndex = _tabController.index; state.currentPageIndex = _tabController.index;
}); });
Future.delayed(Duration.zero, () { Future.delayed(Duration.zero, () {
HomeWidgetRepository().fetchWidget(); HomeWidgetRepository.fetchWidget();
HomeWidgetRepository.decideWhereToGo();
AppInitializer.handleCLick(state, _tabController); AppInitializer.handleCLick(state, _tabController);
}); });
state.refresh(); state.refresh();
@ -46,11 +46,8 @@ class _HomeState extends State<Home>
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: const LogoAppBar(), appBar: const LogoAppBar(),
body: Consumer<HomeState>( body: Consumer<HomeState>(

View File

@ -1,3 +1,4 @@
import 'package:didvan/config/design_config.dart'; import 'package:didvan/config/design_config.dart';
import 'package:didvan/constants/assets.dart'; import 'package:didvan/constants/assets.dart';
import 'package:didvan/main.dart'; import 'package:didvan/main.dart';
@ -18,6 +19,7 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:universal_html/html.dart' as html; import 'package:universal_html/html.dart' as html;
class Splash extends StatefulWidget { class Splash extends StatefulWidget {
const Splash({Key? key}) : super(key: key); const Splash({Key? key}) : super(key: key);
@ -139,6 +141,18 @@ class _SplashState extends State<Splash> {
token == null ? Routes.authenticaion : Routes.home, token == null ? Routes.authenticaion : Routes.home,
arguments: token == null ? false : null, arguments: token == null ? false : null,
); );
return;
// await HomeWidget.getWidgetData<String>("cRouteGoTo", defaultValue: '')
// .then((cRouteGoTo) async {
// if (cRouteGoTo!.isNotEmpty) {
// navigatorKey.currentState!
// .pushNamed(cRouteGoTo.toString(), arguments:cRouteArgs );
// HomeWidget.saveWidgetData("cRouteGoTo", '');
// }
// });
} }
} catch (e) { } catch (e) {
setState(() { setState(() {