Skip to content

Commit

Permalink
Merge pull request #163 from DroidKaigi/takahirom/add-room-color-and-…
Browse files Browse the repository at this point in the history
…apply-theme/2024-07-26

Add room theme color and apply colors
  • Loading branch information
takahirom authored Jul 26, 2024
2 parents 935e4b6 + ec7c35c commit 1634c18
Show file tree
Hide file tree
Showing 31 changed files with 425 additions and 747 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,17 @@ private class ExternalNavController(

/**
* Navigate to Calendar Registration
* @param timeTableItem カレンダー登録に必要なタイムラインアイテムの情報
*/
fun navigateToCalendarRegistration(timeTableItem: TimetableItem) {
fun navigateToCalendarRegistration(timetableItem: TimetableItem) {
val calendarIntent = Intent(Intent.ACTION_INSERT).apply {
data = CalendarContract.Events.CONTENT_URI
putExtras(
bundleOf(
CalendarContract.EXTRA_EVENT_BEGIN_TIME to timeTableItem.startsAt.toEpochMilliseconds(),
CalendarContract.EXTRA_EVENT_END_TIME to timeTableItem.endsAt.toEpochMilliseconds(),
CalendarContract.Events.TITLE to "[${timeTableItem.room.name.currentLangTitle}] ${timeTableItem.title.currentLangTitle}",
CalendarContract.Events.DESCRIPTION to timeTableItem.url,
CalendarContract.Events.EVENT_LOCATION to timeTableItem.room.name.currentLangTitle,
CalendarContract.EXTRA_EVENT_BEGIN_TIME to timetableItem.startsAt.toEpochMilliseconds(),
CalendarContract.EXTRA_EVENT_END_TIME to timetableItem.endsAt.toEpochMilliseconds(),
CalendarContract.Events.TITLE to "[${timetableItem.room.name.currentLangTitle}] ${timetableItem.title.currentLangTitle}",
CalendarContract.Events.DESCRIPTION to timetableItem.url,
CalendarContract.Events.EVENT_LOCATION to timetableItem.room.name.currentLangTitle,
),
)
}
Expand All @@ -253,11 +252,11 @@ private class ExternalNavController(
context.startActivity(Intent(context, OssLicensesMenuActivity::class.java))
}

fun onShareClick(timeTableItem: TimetableItem) {
fun onShareClick(timetableItem: TimetableItem) {
shareNavigator.share(
"[${timeTableItem.room.name.currentLangTitle}] ${timeTableItem.startsTimeString} - ${timeTableItem.endsTimeString}\n" +
"${timeTableItem.title.currentLangTitle}\n" +
timeTableItem.url,
"[${timetableItem.room.name.currentLangTitle}] ${timetableItem.startsTimeString} - ${timetableItem.endsTimeString}\n" +
"${timetableItem.title.currentLangTitle}\n" +
timetableItem.url,
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package io.github.droidkaigi.confsched.shared

import io.github.droidkaigi.confsched.data.Repositories
import io.github.droidkaigi.confsched.data.achievements.AchievementsDataStore
import io.github.droidkaigi.confsched.data.auth.AuthApi
import io.github.droidkaigi.confsched.data.auth.Authenticator
import io.github.droidkaigi.confsched.data.auth.User
import io.github.droidkaigi.confsched.model.AchievementRepository
import io.github.droidkaigi.confsched.data.remoteconfig.RemoteConfigApi
import io.github.droidkaigi.confsched.data.sessions.SessionCacheDataStore
import io.github.droidkaigi.confsched.data.sessions.SessionsApiClient
Expand Down Expand Up @@ -50,10 +48,8 @@ class EntryPointTest {
assertNotNull(kmpEntryPoint.get<AuthApi>())
assertNotNull(kmpEntryPoint.get<SessionsApiClient>())
assertNotNull(kmpEntryPoint.get<SessionCacheDataStore>())
assertNotNull(kmpEntryPoint.get<AchievementsDataStore>())

assertNotNull(kmpEntryPoint.get<SessionsRepository>())
assertNotNull(kmpEntryPoint.get<AchievementRepository>())
assertNotNull(kmpEntryPoint.get<ContributorsRepository>())
assertNotNull(kmpEntryPoint.get<SponsorsRepository>())
assertNotNull(kmpEntryPoint.get<StaffRepository>())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
import org.gradle.api.tasks.testing.logging.TestLogEvent.STARTED
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getByType

Expand All @@ -22,14 +23,16 @@ class AndroidRoborazziPlugin : Plugin<Project> {
testOptions {
unitTests {
all { test ->
test.systemProperties["robolectric.logging.enabled"] = "true"
test.jvmArgs("-noverify")
test.systemProperties["robolectric.graphicsMode"] = "NATIVE"
test.systemProperties["robolectric.pixelCopyRenderMode"] = "hardware"
test.maxParallelForks = Runtime.getRuntime().availableProcessors()
test.testLogging {
events.addAll(listOf(PASSED, SKIPPED, FAILED))
events.addAll(listOf(STARTED, PASSED, SKIPPED, FAILED))
showCauses = true
showExceptions = true
showStandardStreams = true
exceptionFormat = FULL
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
import org.gradle.api.tasks.testing.logging.TestLogEvent.STARTED
import org.gradle.kotlin.dsl.getByType
import kotlin.collections.listOf
import kotlin.collections.set
Expand All @@ -31,7 +32,7 @@ class KmpRoborazziPlugin : Plugin<Project> {

test.maxParallelForks = Runtime.getRuntime().availableProcessors()
test.testLogging {
events.addAll(listOf(PASSED, SKIPPED, FAILED))
events.addAll(listOf(STARTED, PASSED, SKIPPED, FAILED))
showCauses = true
showExceptions = true
exceptionFormat = FULL
Expand Down
2 changes: 1 addition & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ PLATFORM_IOS="iOS Simulator,name=iPhone 15 Pro,OS=17.4"

set -o pipefail && xcodebuild build \
-project $PROJECT \
-scheme "DroidKaigi2024AppWithKmpBuild" \
-scheme "DroidKaigi2024App" \
-configuration Debug \
-destination platform="$PLATFORM_IOS"

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ public annotation class UserDataStoreQualifier
@Qualifier
public annotation class SessionCacheDataStoreQualifier

@Qualifier
public annotation class AchievementsDataStoreQualifier

@InstallIn(SingletonComponent::class)
@Module
public class DataStoreModule {
Expand All @@ -48,21 +45,9 @@ public class DataStoreModule {
producePath = { context.cacheDir.resolve(DATA_STORE_CACHE_PREFERENCE_FILE_NAME).path },
)

@AchievementsDataStoreQualifier
@Provides
@Singleton
public fun provideAchievementsDataStore(
@ApplicationContext context: Context,
): DataStore<Preferences> = createDataStore(
coroutineScope = CoroutineScope(Dispatchers.IO + SupervisorJob()),
producePath = { context.filesDir.resolve(DATA_STORE_ACHIEVEMENTS_FILE_NAME).path },
)

public companion object {
private const val DATA_STORE_PREFERENCE_FILE_NAME = "confsched2024.preferences_pb"
private const val DATA_STORE_CACHE_PREFERENCE_FILE_NAME =
"confsched2024.cache.preferences_pb"
private const val DATA_STORE_ACHIEVEMENTS_FILE_NAME =
"confsched2024.achievements.preferences_pb"
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1634c18

Please sign in to comment.