Add events for subscribe and beast banners

pull/1830/head
Alex Baker 3 years ago
parent 0165cda12b
commit f97a9fc2a3

@ -266,10 +266,12 @@ class TaskEditFragment : Fragment(), Toolbar.OnMenuItemClickListener {
visible = false
preferences.shownBeastModeHint = true
beastMode.launch(Intent(context, BeastModePreferences::class.java))
firebase.logEvent(R.string.event_banner_beast, R.string.param_click to true)
},
dismiss = {
visible = false
preferences.shownBeastModeHint = true
firebase.logEvent(R.string.event_banner_beast, R.string.param_click to false)
}
)
}

@ -194,11 +194,14 @@ class TaskListFragment : Fragment(), OnRefreshListener, Toolbar.OnMenuItemClickL
visible = showBanner,
subscribe = {
showBanner = false
preferences.lastSubscribeRequest = now()
purchase()
firebase.logEvent(R.string.event_banner_sub, R.string.param_click to true)
},
dismiss = {
showBanner = false
preferences.lastSubscribeRequest = now()
firebase.logEvent(R.string.event_banner_sub, R.string.param_click to false)
},
)
}

@ -9,7 +9,6 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.ui.window.Dialog
import androidx.lifecycle.lifecycleScope
import com.google.android.material.composethemeadapter.MdcTheme
import com.todoroo.andlib.utility.DateUtilities
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.launch
import org.tasks.LocalBroadcastManager
@ -41,8 +40,6 @@ class PurchaseActivity : InjectingAppCompatActivity(), OnPurchasesUpdated {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
preferences.lastSubscribeRequest = DateUtilities.now()
val github = intent?.extras?.getBoolean(EXTRA_GITHUB) ?: false
theme.applyToContext(this)

@ -426,10 +426,13 @@
<string name="param_sku">sku</string>
<string name="param_result">result</string>
<string name="param_state">state</string>
<string name="param_click">click</string>
<string name="event_todoagenda">cp_todoagenda</string>
<string name="event_astrid2taskprovider">cp_astrid2taskprovider</string>
<string name="event_sync_add_account">sync_add_account</string>
<string name="event_sync_unknown_access">sync_unknown_access</string>
<string name="event_banner_beast">banner_beast</string>
<string name="event_banner_sub">banner_subscribe</string>
<string name="param_type">type</string>
<string name="p_map_theme">map_theme</string>
<string name="p_picker_mode_date">picker_mode_date</string>

Loading…
Cancel
Save