parent
f976c7c162
commit
a68ffab341
@ -1,42 +1,27 @@
|
||||
import android.content.Context
|
||||
package com.example.what_the_fantasy.logs
|
||||
import android.util.Log
|
||||
import com.example.what_the_fantasy.data.model.User
|
||||
|
||||
class LogsUsers(private val context: Context) {
|
||||
|
||||
private fun isDebug(): Boolean {
|
||||
return (context.applicationInfo.flags and android.content.pm.ApplicationInfo.FLAG_DEBUGGABLE) != 0
|
||||
}
|
||||
|
||||
fun logDebugAllUsers(users: List<User>, titleLog: String) {
|
||||
if (isDebug()) {
|
||||
for (user in users) {
|
||||
Log.d(titleLog, "User created: ${user.username} => ${user.email} => ${user.imgUrl} => ${user.langage}")
|
||||
}
|
||||
class LogsUsers{
|
||||
fun logDebugAllUsers(users : List<User>, titleLog : String){
|
||||
for(user in users){
|
||||
Log.e(titleLog, "User created: ${user.username} => ${user.email} => ${user.imgUrl} => ${user.langage}")
|
||||
}
|
||||
}
|
||||
|
||||
fun logDebugUserEmail(user: User?, titleLog: String) {
|
||||
if (isDebug()) {
|
||||
Log.d(titleLog, "User email: ${user?.username} => ${user?.email}")
|
||||
}
|
||||
fun logDebugUserEmail(user : User?, titleLog : String){
|
||||
Log.e(titleLog, "User created: ${user?.username} => ${user?.email}")
|
||||
}
|
||||
|
||||
fun logDebugUserLangage(user: User?, titleLog: String) {
|
||||
if (isDebug()) {
|
||||
Log.d(titleLog, "User language change: ${user?.username} => ${user?.langage}")
|
||||
}
|
||||
fun logDebugUserLangage(user : User?, titleLog : String){
|
||||
Log.e(titleLog, "User Change: ${user?.username} => ${user?.langage}")
|
||||
}
|
||||
|
||||
fun logInformationUserConnect(user: User?, titleLog: String) {
|
||||
if (isDebug()) {
|
||||
Log.i(titleLog, "${user?.username} logged in")
|
||||
}
|
||||
fun logInformationUserConnect(user : User?, titleLog : String){
|
||||
Log.e(titleLog, "${user?.username} logged in")
|
||||
}
|
||||
|
||||
fun unlogInformationUserConnect(titleLog: String) {
|
||||
if (isDebug()) {
|
||||
Log.i(titleLog, "Logged out")
|
||||
}
|
||||
fun unlogInformationUserConnect(titleLog : String){
|
||||
Log.e(titleLog, "Logged out")
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="39dp"
|
||||
android:height="19dp"
|
||||
android:viewportWidth="39"
|
||||
android:viewportHeight="19">
|
||||
<path
|
||||
android:pathData="M25.655,1.196H11.58C9.495,1.196 7.6,2.098 6.226,3.55C4.852,5.003 4,7.006 4,9.212C4,11.416 4.852,13.42 6.226,14.872C7.6,16.325 9.495,17.226 11.58,17.226H24.79C26.263,18.341 28.065,19 30.003,19H30.015C32.486,19 34.734,17.931 36.361,16.21C37.988,14.489 39,12.114 39,9.5C39,6.887 37.99,4.51 36.359,2.792C34.73,1.07 32.483,0 30.015,0H30.003C28.43,0 26.946,0.435 25.655,1.196ZM30.482,8.22L30.512,8.226C30.568,7.977 30.705,7.779 30.925,7.637C31.143,7.493 31.371,7.451 31.609,7.51L31.616,7.479C31.379,7.42 31.192,7.274 31.057,7.043C30.922,6.81 30.882,6.57 30.938,6.32L30.908,6.312C30.852,6.563 30.715,6.761 30.496,6.904C30.277,7.047 30.048,7.089 29.811,7.029L29.804,7.06C30.042,7.12 30.228,7.266 30.364,7.497C30.5,7.728 30.538,7.968 30.482,8.22ZM33.003,9.432L33.039,9.441C33.109,9.126 33.282,8.878 33.557,8.699C33.832,8.519 34.118,8.466 34.416,8.541L34.425,8.503C34.127,8.428 33.893,8.246 33.723,7.954C33.553,7.663 33.503,7.36 33.573,7.046L33.537,7.037C33.467,7.352 33.294,7.599 33.019,7.779C32.744,7.959 32.457,8.012 32.16,7.937L32.151,7.976C32.449,8.05 32.683,8.232 32.852,8.523C33.023,8.814 33.073,9.118 33.003,9.432ZM30.351,5.022C29.279,5.577 28.507,6.703 28.417,8.053C28.283,10.068 29.719,11.816 31.625,11.958C32.529,12.025 33.377,11.718 34.032,11.161C34.357,10.885 34.693,11.128 34.551,11.476C33.777,13.386 31.923,14.66 29.852,14.505C27.235,14.311 25.263,11.91 25.446,9.143C25.622,6.491 27.724,4.458 30.212,4.481C30.67,4.486 30.767,4.807 30.351,5.022ZM30.003,1.123H30.015C34.373,1.123 37.939,4.892 37.939,9.5C37.939,14.108 34.369,17.878 30.015,17.878H30.003C25.65,17.878 22.08,14.108 22.08,9.5C22.08,4.892 25.645,1.123 30.003,1.123Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
Loading…
Reference in new issue