Skip to content

Commit

Permalink
Merge pull request #360 from aiyu-ayaan/working
Browse files Browse the repository at this point in the history
Pre-release 6.0.1.5.2 done
  • Loading branch information
aiyu-ayaan authored Dec 28, 2024
2 parents 93bd864 + 3b4dfff commit 6ef1936
Show file tree
Hide file tree
Showing 13 changed files with 196 additions and 165 deletions.
88 changes: 44 additions & 44 deletions .github/workflows/Pull Request.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
name: Check pull request 👀
on:
pull_request:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # Upgraded to v4 for better performance
with:
fetch-depth: 1 # Shallow clone for faster checkout
- name: Set up JDK 17
uses: actions/setup-java@v3 # Upgraded to v3
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle' # Enables Gradle caching
- name: Setup Gradle Cache
uses: gradle/gradle-build-action@v2 # Added dedicated Gradle cache
with:
gradle-home-cache-cleanup: true
- name: Decode google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.APP_GOOGLE_JSON }}
run: echo $GOOGLE_SERVICES_JSON > ./bitapp/google-services.json
- name: Create local.properties
env:
FIREBASE_WEB_CLIENT_ID: ${{ secrets.FIREBASE_WEB_CLIENT_ID }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
echo "firebaseWebClient=${FIREBASE_WEB_CLIENT_ID}" > ./local.properties
echo "apiKey=${GEMINI_API_KEY}" >> ./local.properties
- name: Build Debug APK
run: |
chmod +x ./gradlew
./gradlew :bitapp:assembleDebug --parallel --daemon --build-cache --configure-on-demand
#name: Check pull request 👀
#on:
# pull_request:
# branches:
# - master
# workflow_dispatch:
#
#jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4 # Upgraded to v4 for better performance
# with:
# fetch-depth: 1 # Shallow clone for faster checkout
#
# - name: Set up JDK 17
# uses: actions/setup-java@v3 # Upgraded to v3
# with:
# java-version: 17
# distribution: 'temurin'
# cache: 'gradle' # Enables Gradle caching
#
# - name: Setup Gradle Cache
# uses: gradle/gradle-build-action@v2 # Added dedicated Gradle cache
# with:
# gradle-home-cache-cleanup: true
#
# - name: Decode google-services.json
# env:
# GOOGLE_SERVICES_JSON: ${{ secrets.APP_GOOGLE_JSON }}
# run: echo $GOOGLE_SERVICES_JSON > ./bitapp/google-services.json
#
# - name: Create local.properties
# env:
# FIREBASE_WEB_CLIENT_ID: ${{ secrets.FIREBASE_WEB_CLIENT_ID }}
# GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
# run: |
# echo "firebaseWebClient=${FIREBASE_WEB_CLIENT_ID}" > ./local.properties
# echo "apiKey=${GEMINI_API_KEY}" >> ./local.properties
#
# - name: Build Debug APK
# run: |
# chmod +x ./gradlew
# ./gradlew :bitapp:assembleDebug --parallel --daemon --build-cache --configure-on-demand
4 changes: 2 additions & 2 deletions .idea/deploymentTargetSelector.xml

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

8 changes: 8 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

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

6 changes: 3 additions & 3 deletions bitapp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ android {
applicationId = "com.atech.bit"
minSdk = 24
targetSdk = 35
versionCode = 84
versionName = "6.0.1.5.1"
versionCode = 85
versionName = "6.0.1.5.2"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -91,7 +91,7 @@ android {
// kotlinCompilerExtensionVersion = "1.5.8"
// }
composeCompiler {
enableStrongSkippingMode = true
// enableStrongSkippingMode = true

reportsDestination = layout.buildDirectory.dir("compose_compiler")
stabilityConfigurationFile =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ import android.os.Bundle
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.LifecycleOwner
Expand Down Expand Up @@ -69,6 +72,7 @@ class MainActivity : ComponentActivity(), LifecycleEventObserver,
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
viewModel.checkTime()
enableEdgeToEdge()
setContent {
val themeState by viewModel.themeState
val navHostController = rememberNavController()
Expand All @@ -80,9 +84,10 @@ class MainActivity : ComponentActivity(), LifecycleEventObserver,
ThemeMode.SYSTEM -> isSystemInDarkTheme()
}
) {
Surface(
modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.surface
) {
Scaffold(
modifier = Modifier.fillMaxSize()
) { contentPadding ->

LaunchedEffect(key1 = viewModel.isTimeCorrect.value) {
if (!viewModel.isTimeCorrect.value && viewModel.hasSetUpDone) {
navHostController.popBackStack()
Expand All @@ -97,6 +102,12 @@ class MainActivity : ComponentActivity(), LifecycleEventObserver,
)
}
TopLevelNavigationGraph(
modifier = Modifier.padding(
PaddingValues(
top = 0.dp,
bottom = 0.dp
)
),
navHostController = navHostController,
communicatorViewModel = viewModel,
startDestination = if (viewModel.isForceScreenEnable.value) ParentScreenRoutes.ForceScreen.route
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package com.atech.bit.ui.navigation

import android.content.Intent
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.core.net.toUri
import androidx.navigation.NavController
import androidx.navigation.NavDeepLinkRequest
Expand Down Expand Up @@ -45,12 +46,15 @@ sealed class ParentScreenRoutes(val route: String) {

@Composable
fun TopLevelNavigationGraph(
modifier: Modifier = Modifier,
navHostController: NavHostController,
communicatorViewModel: MainViewModel,
startDestination: String = ParentScreenRoutes.LoginScreen.route
) {
NavHost(
navController = navHostController, startDestination = startDestination
modifier = modifier,
navController = navHostController,
startDestination = startDestination
) {
logInScreenGraph(
navHostController, communicatorViewModel
Expand Down Expand Up @@ -174,11 +178,13 @@ sealed class Screen(val route: String) {

@Composable
fun AppNavigationGraph(
modifier: Modifier = Modifier,
navHostController: NavHostController,
communicatorViewModel: MainViewModel,
startDestination: String = Screen.HomeScreen.route
) {
NavHost(
modifier = modifier,
navController = navHostController, startDestination = startDestination
) {
attendanceGraph(
Expand Down
29 changes: 16 additions & 13 deletions bitapp/src/main/java/com/atech/bit/ui/screens/MainScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

package com.atech.bit.ui.screens

import android.util.Log
import android.annotation.SuppressLint
import androidx.annotation.DrawableRes
import androidx.annotation.Keep
import androidx.annotation.StringRes
Expand All @@ -19,8 +19,8 @@ import androidx.compose.animation.shrinkVertically
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -56,7 +56,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
Expand Down Expand Up @@ -90,7 +89,6 @@ import com.atech.bit.ui.navigation.CourseScreenRoute
import com.atech.bit.ui.navigation.HomeScreenRoutes
import com.atech.bit.ui.navigation.Screen
import com.atech.bit.ui.navigation.listOfFragmentsWithBottomAppBar
import com.atech.bit.ui.screens.attendance.attendance_screen.component.AttendanceScreen
import com.atech.bit.ui.theme.BITAppTheme
import com.atech.bit.ui.theme.captionColor
import com.atech.bit.ui.theme.drawerColor
Expand All @@ -112,6 +110,7 @@ data class ShowSocietyOrEvent(
)

@Composable
@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
fun MainScreen(
modifier: Modifier = Modifier,
navController: NavHostController = rememberNavController(),
Expand Down Expand Up @@ -182,14 +181,17 @@ fun MainScreen(
isChatScreenVisible = communicatorViewModel.isChatScreenEnable.value
)
}) {
Column(
modifier = Modifier.padding(it)
) {
AppNavigationGraph(
navHostController = navController,
communicatorViewModel = communicatorViewModel
)
}
// Column(
// modifier = Modifier.padding(it)
// ) {
AppNavigationGraph(
modifier = Modifier.padding(
PaddingValues(0.dp)
),
navHostController = navController,
communicatorViewModel = communicatorViewModel
)
// }
}
}
}
Expand Down Expand Up @@ -327,7 +329,8 @@ private fun ColumnScope.drawerItem(
) = this.apply {
val context = LocalContext.current
val color = MaterialTheme.colorScheme.primary.toArgb()
NavigationDrawerItem(modifier = Modifier.padding(
NavigationDrawerItem(
modifier = Modifier.padding(
NavigationDrawerItemDefaults.ItemPadding
),
colors = NavigationDrawerItemDefaults.colors(
Expand Down
Loading

0 comments on commit 6ef1936

Please sign in to comment.