-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: nested scroll pullRefresh * fix: the poll status was not synchronized for repost's post * chore: change function name * feat: add new component (TextWithEmoji), add height limit when ReplyTextField is not expanded * chore: delete ripple of emoji group picker * feat: fix searchBar animation * chore: add emoji size parameter for TextWithEmoji * chore: add min height for preview card * fix: inconsistent font sizes * chore: temporary push * fix: fix background color of a PNG avatar * test: update some unit test modules * chore: remove unnecessary code * fix: multi-account changing * feat: add localized strings for mention text --------- Co-authored-by: lazzzis <[email protected]>
- Loading branch information
1 parent
a5fcdca
commit 27da952
Showing
37 changed files
with
1,043 additions
and
533 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
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
73 changes: 73 additions & 0 deletions
73
app/src/main/java/com/github/whitescent/mastify/di/CoroutineModule.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,73 @@ | ||
/* | ||
* Copyright 2024 WhiteScent | ||
* | ||
* This file is a part of Mastify. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under the terms of the | ||
* GNU General Public License as published by the Free Software Foundation; either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* Mastify is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even | ||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
* Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with Mastify; if not, | ||
* see <http://www.gnu.org/licenses>. | ||
*/ | ||
|
||
package com.github.whitescent.mastify.di | ||
|
||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import kotlinx.coroutines.CoroutineDispatcher | ||
import kotlinx.coroutines.CoroutineScope | ||
import kotlinx.coroutines.Dispatchers | ||
import kotlinx.coroutines.SupervisorJob | ||
import javax.inject.Qualifier | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
class DispatcherModule { | ||
|
||
@DefaultDispatcher | ||
@Provides | ||
fun provideDefaultDispatcher(): CoroutineDispatcher = Dispatchers.Default | ||
|
||
@IoDispatcher | ||
@Provides | ||
fun provideIoDispatcher(): CoroutineDispatcher = Dispatchers.IO | ||
|
||
@MainDispatcher | ||
@Provides | ||
fun provideMainDispatcher(): CoroutineDispatcher = Dispatchers.Main | ||
} | ||
|
||
@InstallIn(SingletonComponent::class) | ||
@Module | ||
class CoroutinesScopesModule { | ||
@Singleton | ||
@Provides | ||
@ApplicationScope | ||
fun providesCoroutineScope( | ||
@DefaultDispatcher defaultDispatcher: CoroutineDispatcher | ||
): CoroutineScope = CoroutineScope(SupervisorJob() + defaultDispatcher) | ||
} | ||
|
||
@Retention(AnnotationRetention.BINARY) | ||
@Qualifier | ||
annotation class ApplicationScope | ||
|
||
@Retention(AnnotationRetention.BINARY) | ||
@Qualifier | ||
annotation class DefaultDispatcher | ||
|
||
@Retention(AnnotationRetention.BINARY) | ||
@Qualifier | ||
annotation class IoDispatcher | ||
|
||
@Retention(AnnotationRetention.BINARY) | ||
@Qualifier | ||
annotation class MainDispatcher |
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
Oops, something went wrong.