Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Bulk actions broken notification #650

Merged
merged 1 commit into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,4 @@ enum class BulkOperationType(@StringRes val title: Int, @PluralsRes val successM
else -> context.copyOperationProgressNotification()
}
}

override fun toString(): String = name.lowercase().replaceFirstChar { it.titlecase() }
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ import com.infomaniak.lib.core.utils.hideProgress
import com.infomaniak.lib.core.utils.initProgress
import com.infomaniak.lib.core.utils.showProgress
import kotlinx.android.synthetic.main.fragment_file_share_link_settings.*
import kotlinx.android.synthetic.main.fragment_file_share_link_settings.expirationDateInput
import kotlinx.android.synthetic.main.fragment_file_share_link_settings.newPasswordButton
import kotlinx.android.synthetic.main.fragment_file_share_link_settings.passwordTextLayout
import kotlinx.android.synthetic.main.item_dropbox_settings.*
import kotlinx.android.synthetic.main.item_dropbox_settings.expirationDateSwitch
import java.util.*

class FileShareLinkSettingsFragment : Fragment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,10 @@ abstract class MultiSelectFragment(private val matomoCategory: String) : Fragmen
}

private fun Context.trackBulkActionEvent(category: String, action: BulkOperationType, modifiedFileNumber: Int) {
val trackerName = "bulk" + (if (modifiedFileNumber == 1) "Single" else "") + action.toString()

fun BulkOperationType.toMatomoString(): String = name.lowercase().replaceFirstChar { it.titlecase() }

val trackerName = "bulk" + (if (modifiedFileNumber == 1) "Single" else "") + action.toMatomoString()
trackEvent(category, TrackerAction.CLICK, trackerName, modifiedFileNumber.toFloat())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,9 @@ class FileInfoActionsView @JvmOverloads constructor(
}
}

companion object {

private fun Context.trackFileActionEvent(trackerName: String, trackerValue: Float? = null) {
private companion object {
fun Context.trackFileActionEvent(trackerName: String, trackerValue: Float? = null) {
trackEvent("fileAction", TrackerAction.CLICK, trackerName, trackerValue)
}

}
}