Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Karrar-Mohammed committed Jan 17, 2023
2 parents d889d63 + 36dc8e3 commit c1b1f44
Show file tree
Hide file tree
Showing 181 changed files with 1,816 additions and 1,173 deletions.
13 changes: 9 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ android {
applicationId "com.thechance.clubs"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
versionCode 1000001
versionName "1.0-alpha01"
multiDexEnabled true

buildConfigField "String", "API_KEY", localProperties['apiKey']
Expand All @@ -32,6 +32,12 @@ android {
}
}

lint {
baseline = file("lint-baseline.xml")
}
lintOptions {
disable "Instantiatable"
}
buildTypes {
release {
minifyEnabled false
Expand Down Expand Up @@ -77,6 +83,7 @@ dependencies {
api(project(":chat:remote"))
api(project(":chat:local"))
api(project(":common:firebase"))
api(project(":common:remote"))
//endregion

//region identity
Expand All @@ -88,8 +95,6 @@ dependencies {
api(project(":identity:local"))
//endregion

implementation 'com.android.support:multidex:1.0.3'

//Retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$gson_version"
Expand Down
Binary file removed app/src/debug/ic_launcher-playstore.png
Binary file not shown.
5 changes: 0 additions & 5 deletions app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml

This file was deleted.

1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

<application
android:name=".ClubsApplication"
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/com/thechance/clubs/di/DataSourceModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package com.thechance.clubs.di
import com.common.local.dataSource.ChatLocalDataSourceImp
import com.common.local.dataSource.CoreLocalDataSourceImp
import com.common.local.dataSource.IdentityLocalDataSourceImp
import com.common.remote.FirebaseCloudMessagingDataSourceImp
import com.devfalah.firebase.ChatFirebaseDataSourceImp
import com.devfalah.firebase.CoreFireStoreDataSourceImpl
import com.devfalah.firebase.IdentityFirebaseDataSourceImp
import com.devfalah.local.ChatDataStoreDataSourceImp
import com.devfalah.remote.RemoteDataSourceImp
import com.devfalah.repositories.CoreLocalDataSource
import com.devfalah.repositories.CoreFireStoreDataSource
import com.devfalah.repositories.FirebaseCloudMessagingDataSource
import com.devfalah.repositories.RemoteDataSource
import com.devfalah.repository.ChatDataStoreDataSource
import com.devfalah.repository.ChatFirebaseDataSource
Expand Down Expand Up @@ -81,4 +83,9 @@ abstract class DataSourceModule {
identityLocalDataSourceImp: IdentityLocalDataSourceImp,
): IdentityLocalDataSource

@Binds
abstract fun bindFirebaseCloudMessagingDataSource(
firebaseCloudMessagingDataSource: FirebaseCloudMessagingDataSourceImp,
): FirebaseCloudMessagingDataSource

}
25 changes: 25 additions & 0 deletions app/src/main/java/com/thechance/clubs/di/NetworkModule.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.thechance.clubs.di

import com.common.remote.FirebaseCloudMessagingService
import com.devfalah.remote.AuthInterceptor
import com.devfalah.remote.ClubService
import com.devfalah.remote.DdosInterceptor
Expand Down Expand Up @@ -39,6 +40,14 @@ object NetworkModule {
return retrofit.create(ChatService::class.java)
}

@Singleton
@Provides
fun provideFirebaseCloudMessagingService(
@RetrofitFirebaseCloudMessagingService retrofit: Retrofit,
): FirebaseCloudMessagingService {
return retrofit.create(FirebaseCloudMessagingService::class.java)
}

@Singleton
@Provides
fun provideIdentityService(
Expand Down Expand Up @@ -67,6 +76,18 @@ object NetworkModule {
.build()
}

@RetrofitFirebaseCloudMessagingService
@Singleton
@Provides
fun provideRetrofitFirebaseCloudMessagingService(
gsonConverterFactory: GsonConverterFactory,
): Retrofit {
return Retrofit.Builder()
.baseUrl(FirebaseCloudMessagingService.BASE_URL)
.addConverterFactory(gsonConverterFactory)
.build()
}

@RetrofitClubService
@Singleton
@Provides
Expand Down Expand Up @@ -110,6 +131,10 @@ object NetworkModule {
@Retention(AnnotationRetention.BINARY)
annotation class RetrofitCloudMessagingService

@Qualifier
@Retention(AnnotationRetention.BINARY)
annotation class RetrofitFirebaseCloudMessagingService

@Singleton
@Provides
fun provideFirebaseFireStore(): FirebaseFirestore {
Expand Down
30 changes: 0 additions & 30 deletions app/src/main/res/drawable-v24/ic_launcher_foreground.xml

This file was deleted.

170 changes: 0 additions & 170 deletions app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

4 changes: 2 additions & 2 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_logo_foreground"/>
</adaptive-icon>
4 changes: 2 additions & 2 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_logo_foreground"/>
</adaptive-icon>
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ data class Notification (
val to: String,
val title: String,
val body: String,
val clickAction: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ fun Notification.toDto(): NotificationDto {
friendId = this.friendId,
title = this.title,
description = this.body,
clickAction = clickAction
),
to = this.to,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ object NotificationKeys{
const val FRIEND_ID_KEY = "friendId"
const val TITLE = "title"
const val DESCRIPTION = "description"
const val CLICK_ACTION = "click_action"
}

data class NotificationDto(
Expand All @@ -24,4 +25,6 @@ data class NotificationDataModel(
val title: String = "",
@SerializedName(NotificationKeys.DESCRIPTION)
val description: String = "",
@SerializedName(NotificationKeys.CLICK_ACTION)
val clickAction: String = "",
)
Loading

0 comments on commit c1b1f44

Please sign in to comment.