feat: Update version to 1.0.6 and enhance release notes with new features and improvements
This commit is contained in:
@@ -238,7 +238,8 @@ class MessageRepository private constructor(private val context: Context) {
|
||||
val encryptedPlainMessage =
|
||||
try {
|
||||
CryptoManager.encryptWithPassword(messageText, privateKey)
|
||||
} catch (_: Exception) {
|
||||
} catch (e: Exception) {
|
||||
android.util.Log.e("ReleaseNotes", "❌ encryptWithPassword failed", e)
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -294,12 +295,23 @@ class MessageRepository private constructor(private val context: Context) {
|
||||
* Called after account initialization, like desktop useUpdateMessage hook
|
||||
*/
|
||||
suspend fun checkAndSendVersionUpdateMessage() {
|
||||
val account = currentAccount ?: return
|
||||
val account = currentAccount
|
||||
if (account == null) {
|
||||
android.util.Log.w("ReleaseNotes", "❌ currentAccount is null, skipping update message")
|
||||
return
|
||||
}
|
||||
val privateKey = currentPrivateKey
|
||||
if (privateKey == null) {
|
||||
android.util.Log.w("ReleaseNotes", "❌ currentPrivateKey is null, skipping update message")
|
||||
return
|
||||
}
|
||||
val prefs = context.getSharedPreferences("rosetta_system_${account}", Context.MODE_PRIVATE)
|
||||
val lastNoticeKey = prefs.getString("lastNoticeKey", "") ?: ""
|
||||
val currentVersion = com.rosetta.messenger.BuildConfig.VERSION_NAME
|
||||
val currentKey = "${currentVersion}_${ReleaseNotes.noticeHash}"
|
||||
|
||||
android.util.Log.d("ReleaseNotes", "checkUpdate: version=$currentVersion, lastKey=$lastNoticeKey, currentKey=$currentKey, match=${lastNoticeKey == currentKey}")
|
||||
|
||||
if (lastNoticeKey != currentKey) {
|
||||
// Delete the previous message for this version (if any)
|
||||
val prevMessageId = prefs.getString("lastNoticeMessageId_$currentVersion", null)
|
||||
@@ -309,10 +321,16 @@ class MessageRepository private constructor(private val context: Context) {
|
||||
}
|
||||
|
||||
val messageId = addUpdateSystemMessage(ReleaseNotes.getNotice(currentVersion))
|
||||
prefs.edit()
|
||||
.putString("lastNoticeKey", currentKey)
|
||||
.putString("lastNoticeMessageId_$currentVersion", messageId)
|
||||
.apply()
|
||||
android.util.Log.d("ReleaseNotes", "addUpdateSystemMessage result: messageId=$messageId")
|
||||
if (messageId != null) {
|
||||
prefs.edit()
|
||||
.putString("lastNoticeKey", currentKey)
|
||||
.putString("lastNoticeMessageId_$currentVersion", messageId)
|
||||
.apply()
|
||||
android.util.Log.d("ReleaseNotes", "✅ Update message saved successfully")
|
||||
} else {
|
||||
android.util.Log.e("ReleaseNotes", "❌ Failed to create update message")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,15 +17,15 @@ object ReleaseNotes {
|
||||
val RELEASE_NOTICE = """
|
||||
Update v$VERSION_PLACEHOLDER
|
||||
|
||||
- Emoji keyboard in attachment panel with smooth transitions
|
||||
- File browser — send any file from device storage
|
||||
- Send gallery photos as files (without compression)
|
||||
- Camera: pinch-to-zoom, zoom slider, transparent status bar
|
||||
- Double checkmarks for read photos, files and avatars
|
||||
- Haptic feedback on swipe-to-reply
|
||||
- System accounts hidden from forward picker
|
||||
- Smoother caption bar animations
|
||||
- Bug fixes and performance improvements
|
||||
- Исправлена критическая ошибка синхронизации сообщений между ПК и мобильным устройством
|
||||
- Подтверждение доставки теперь отправляется только после успешной обработки
|
||||
- Автоматическая синхронизация при возврате из фона
|
||||
- Анимация сайдбара в стиле Telegram
|
||||
- Исправлены артефакты на разделителях при анимации
|
||||
- Улучшено качество блюра аватара на экранах профиля
|
||||
- Устранены артефакты по краям изображения
|
||||
- Обновлён цвет шапки и сайдбара в светлой теме
|
||||
- Белая галочка верификации на экранах профиля
|
||||
""".trimIndent()
|
||||
|
||||
fun getNotice(version: String): String =
|
||||
|
||||
Reference in New Issue
Block a user