-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from hamza94max/New-Ui
New UI
- Loading branch information
Showing
89 changed files
with
1,723 additions
and
1,137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.islamey.hamza.wazaker | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class App : Application() {} |
3 changes: 0 additions & 3 deletions
3
app/src/main/java/com/islamey/hamza/wazaker/data/Models/AzkarListModel.kt
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
app/src/main/java/com/islamey/hamza/wazaker/data/Models/Hadith.kt
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/islamey/hamza/wazaker/data/remote/ApiService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.islamey.hamza.wazaker.data.remote | ||
|
||
import com.islamey.hamza.wazaker.domain.Models.HijriDateResponse | ||
import retrofit2.http.GET | ||
import retrofit2.http.Path | ||
|
||
interface ApiService { | ||
|
||
|
||
@GET("v1/gToH/{date}") | ||
suspend fun getHijriDate( | ||
@Path("date") date: String | ||
): HijriDateResponse | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/islamey/hamza/wazaker/data/repoImpl/HijriRepoImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.islamey.hamza.wazaker.data.repoImpl | ||
|
||
import com.islamey.hamza.wazaker.data.remote.ApiService | ||
import com.islamey.hamza.wazaker.domain.Models.HijriDateResponse | ||
import com.islamey.hamza.wazaker.domain.repo.HijriRepo | ||
|
||
class HijriRepoImpl(private val apiService: ApiService) : HijriRepo { | ||
|
||
|
||
override suspend fun getHijriDate(date: String): HijriDateResponse { | ||
return apiService.getHijriDate(date) | ||
} | ||
|
||
|
||
} |
54 changes: 54 additions & 0 deletions
54
app/src/main/java/com/islamey/hamza/wazaker/di/NetworkModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.islamey.hamza.wazaker.di | ||
|
||
import com.google.gson.GsonBuilder | ||
import com.islamey.hamza.wazaker.data.remote.ApiService | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import okhttp3.OkHttpClient | ||
import retrofit2.Retrofit | ||
import retrofit2.converter.gson.GsonConverterFactory | ||
import java.util.concurrent.TimeUnit | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object NetworkModule { | ||
|
||
const val BASE_URL = "https://api.aladhan.com/" | ||
|
||
@Provides | ||
@Singleton | ||
fun provideOkHttpClient(): OkHttpClient { | ||
return OkHttpClient.Builder() | ||
.connectTimeout(30, TimeUnit.SECONDS) | ||
.readTimeout(30, TimeUnit.SECONDS) | ||
.build() | ||
} | ||
|
||
@Provides | ||
@Singleton | ||
fun provideRetrofit(okHttpClient: OkHttpClient): Retrofit { | ||
return Retrofit.Builder() | ||
.baseUrl(BASE_URL) | ||
.client(okHttpClient) | ||
.addConverterFactory( | ||
GsonConverterFactory.create( | ||
GsonBuilder() | ||
.setLenient() | ||
.create() | ||
) | ||
) | ||
.build() | ||
|
||
} | ||
|
||
@Provides | ||
@Singleton | ||
fun provideApiService(retrofit: Retrofit): ApiService { | ||
return retrofit.create(ApiService::class.java) | ||
} | ||
|
||
|
||
} |
22 changes: 22 additions & 0 deletions
22
app/src/main/java/com/islamey/hamza/wazaker/di/RepoModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.islamey.hamza.wazaker.di | ||
|
||
import com.islamey.hamza.wazaker.data.remote.ApiService | ||
import com.islamey.hamza.wazaker.data.repoImpl.HijriRepoImpl | ||
import com.islamey.hamza.wazaker.domain.repo.HijriRepo | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object RepoModule { | ||
|
||
|
||
@Provides | ||
fun provideHijriRepo(apiService: ApiService): HijriRepo { | ||
return HijriRepoImpl(apiService) | ||
} | ||
|
||
|
||
} |
4 changes: 2 additions & 2 deletions
4
...wazaker/data/DataSets/AzkarListDataset.kt → ...zaker/domain/DataSets/AzkarListDataset.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...aker/data/DataSets/EveningAzkarDataset.kt → ...er/domain/DataSets/EveningAzkarDataset.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...mza/wazaker/data/DataSets/FortyDataSet.kt → ...a/wazaker/domain/DataSets/FortyDataSet.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...wazaker/data/DataSets/FortyListDataset.kt → ...zaker/domain/DataSets/FortyListDataset.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...aker/data/DataSets/MorningAzkarDataset.kt → ...er/domain/DataSets/MorningAzkarDataset.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...aker/data/DataSets/NotificationDataset.kt → ...er/domain/DataSets/NotificationDataset.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.