-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[_]: Generate video thumbnails correctly
- Loading branch information
Showing
31 changed files
with
1,030 additions
and
317 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,4 +69,6 @@ android/keystores/debug.keystore | |
# generated by bob | ||
lib/ | ||
|
||
.npmrc | ||
.npmrc | ||
|
||
config.json |
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
27 changes: 27 additions & 0 deletions
27
android/src/main/java/com/internxt/mobilesdk/data/photos/DevicePhoto.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,27 @@ | ||
package com.internxt.mobilesdk.data.photos | ||
|
||
|
||
import android.net.Uri | ||
import java.io.File | ||
import java.time.OffsetDateTime | ||
|
||
enum class DevicePhotosItemType { | ||
IMAGE, | ||
VIDEO | ||
} | ||
data class DevicePhotosItem( | ||
val displayName: String, | ||
val takenAt: OffsetDateTime, | ||
val uri: Uri, | ||
val type: DevicePhotosItemType | ||
) | ||
|
||
data class DisplayablePhotosItem( | ||
val name: String, | ||
val type: DevicePhotosItemType, | ||
val takenAt: OffsetDateTime, | ||
val updatedAt: OffsetDateTime, | ||
val size: Long, | ||
val width: Int, | ||
val height: Int | ||
) |
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
34 changes: 34 additions & 0 deletions
34
android/src/main/java/com/internxt/mobilesdk/services/database/AppDatabase.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,34 @@ | ||
package com.internxt.mobilesdk.services.database | ||
|
||
import android.content.Context | ||
import androidx.room.Database | ||
import androidx.room.Room | ||
import androidx.room.RoomDatabase | ||
import com.internxt.mobilesdk.services.database.photos.PhotosDBItem | ||
import com.internxt.mobilesdk.services.database.photos.PhotosDao | ||
import com.internxt.mobilesdk.services.database.photos.SyncedPhotosDao | ||
import com.internxt.mobilesdk.services.database.photos.SyncedPhotosItem | ||
|
||
|
||
@Database(entities = [PhotosDBItem::class, SyncedPhotosItem::class], version = 1) | ||
abstract class AppDatabase : RoomDatabase() { | ||
abstract fun photosDao(): PhotosDao? | ||
|
||
abstract fun syncedPhotosDao(): SyncedPhotosDao? | ||
companion object { | ||
@Volatile | ||
private var INSTANCE: AppDatabase? = null | ||
|
||
fun getInstance(context: Context): AppDatabase { | ||
return INSTANCE ?: synchronized(this) { | ||
val instance = Room.databaseBuilder( | ||
context.applicationContext, | ||
AppDatabase::class.java, | ||
"internxt_app_database" | ||
).build() | ||
INSTANCE = instance | ||
instance | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.