Skip to content

Commit

Permalink
Merge pull request #4 from thekaailashsharma/rewards
Browse files Browse the repository at this point in the history
Rewards
  • Loading branch information
thekaailashsharma committed Sep 14, 2023
2 parents f3ba300 + 0a9b766 commit ec7e238
Show file tree
Hide file tree
Showing 13 changed files with 819 additions and 293 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

1 change: 1 addition & 0 deletions app/src/main/java/app/waste2wealth/com/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class MainActivity : ComponentActivity() {
NavigationController(scaffoldState, locationViewModel, navController)
// CompleteProfile()


}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app.waste2wealth.com.communities
import androidx.compose.runtime.mutableStateOf
import androidx.lifecycle.ViewModel

class MainViewModel : ViewModel() {
class CommunitiesViewModel : ViewModel() {
val expandedState = mutableStateOf(0f)
val expandedState2 = mutableStateOf(0f)
val currentPage = mutableStateOf(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.draggable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
Expand All @@ -45,7 +42,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.rotate
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.res.painterResource
Expand All @@ -65,7 +61,7 @@ import com.google.accompanist.permissions.ExperimentalPermissionsApi
import com.google.accompanist.permissions.rememberMultiplePermissionsState
import com.jet.firestore.JetFirestore
import com.jet.firestore.getListOfObjects
import app.waste2wealth.com.communities.MainViewModel
import app.waste2wealth.com.communities.CommunitiesViewModel
import app.waste2wealth.com.profile.ProfileImage

@OptIn(
Expand Down Expand Up @@ -157,7 +153,7 @@ fun CommunitiesSection(navController: NavController, email: String) {
label = ""
)

val viewModel: MainViewModel = remember { MainViewModel() }
val viewModel: CommunitiesViewModel = remember { CommunitiesViewModel() }
Column(
modifier = Modifier
.background(appBackground)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import app.waste2wealth.com.communities.MainViewModel
import app.waste2wealth.com.communities.CommunitiesViewModel
import app.waste2wealth.com.communities.data.Drives

val cleanlinessDrives = listOf(
Expand All @@ -41,7 +41,7 @@ val cleanlinessDrives = listOf(
@Composable
fun LazyCard(
list: List<Drives?>?,
viewModel: MainViewModel
viewModel: CommunitiesViewModel
) {
LazyColumn(
contentPadding = PaddingValues(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package app.waste2wealth.com.communities.ui

import android.util.Log
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.draggable
import androidx.compose.foundation.gestures.rememberDraggableState
Expand All @@ -20,7 +18,6 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredHeight
import androidx.compose.foundation.layout.requiredWidth
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Button
import androidx.compose.material.ButtonDefaults
Expand All @@ -39,7 +36,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.layoutId
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.constraintlayout.compose.ExperimentalMotionApi
Expand All @@ -49,7 +45,7 @@ import app.waste2wealth.com.R
import com.google.accompanist.pager.ExperimentalPagerApi
import com.google.accompanist.pager.HorizontalPager
import com.google.accompanist.pager.rememberPagerState
import app.waste2wealth.com.communities.MainViewModel
import app.waste2wealth.com.communities.CommunitiesViewModel
import app.waste2wealth.com.components.permissions.Grapple
import app.waste2wealth.com.profile.ProfileImage
import app.waste2wealth.com.ui.theme.CardColor
Expand Down Expand Up @@ -109,7 +105,7 @@ val items = listOf(
@OptIn(ExperimentalPagerApi::class, ExperimentalMotionApi::class)
@Composable
fun Pager2(
viewModel: MainViewModel,
viewModel: CommunitiesViewModel,
progress2: MutableState<Float>,
padding: PaddingValues,
) {
Expand Down
Loading

0 comments on commit ec7e238

Please sign in to comment.