diff --git a/chat/src/main/java/org/navgurukul/chat/core/di/ChatModules.kt b/chat/src/main/java/org/navgurukul/chat/core/di/ChatModules.kt index 1043a6739..29888c01e 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/di/ChatModules.kt +++ b/chat/src/main/java/org/navgurukul/chat/core/di/ChatModules.kt @@ -21,7 +21,7 @@ import org.navgurukul.chat.core.error.ChatErrorFormatter import org.navgurukul.chat.core.pushers.PushersManager import org.navgurukul.chat.core.repo.* import org.navgurukul.chat.core.resources.* -import org.navgurukul.chat.core.utils.DimensionConverter +import org.merakilearn.core.utils.DimensionConverter import org.navgurukul.chat.features.crypto.KeyRequestHandler import org.navgurukul.chat.features.grouplist.SelectedGroupDataSource import org.navgurukul.chat.features.home.AvatarRenderer diff --git a/chat/src/main/java/org/navgurukul/chat/core/extensions/TextView.kt b/chat/src/main/java/org/navgurukul/chat/core/extensions/TextView.kt index 4817f9ac8..16fc6884a 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/extensions/TextView.kt +++ b/chat/src/main/java/org/navgurukul/chat/core/extensions/TextView.kt @@ -10,7 +10,7 @@ import androidx.annotation.StringRes import androidx.core.view.isVisible import com.google.android.material.snackbar.Snackbar import org.navgurukul.chat.R -import org.navgurukul.chat.core.utils.copyToClipboard +import org.merakilearn.core.utils.copyToClipboard import org.navgurukul.commonui.themes.ThemeUtils /** diff --git a/chat/src/main/java/org/navgurukul/chat/core/intent/MerakiMimeType.kt b/chat/src/main/java/org/navgurukul/chat/core/intent/MerakiMimeType.kt index e3e83e20a..7e4b68c55 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/intent/MerakiMimeType.kt +++ b/chat/src/main/java/org/navgurukul/chat/core/intent/MerakiMimeType.kt @@ -3,7 +3,7 @@ package org.navgurukul.chat.core.intent import android.content.Context import android.net.Uri import android.webkit.MimeTypeMap -import org.navgurukul.chat.core.utils.getFileExtension +import org.merakilearn.core.utils.getFileExtension import timber.log.Timber /** diff --git a/chat/src/main/java/org/navgurukul/chat/core/repo/ActiveSessionDataSource.kt b/chat/src/main/java/org/navgurukul/chat/core/repo/ActiveSessionDataSource.kt index cdbcb817e..5b9ba680a 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/repo/ActiveSessionDataSource.kt +++ b/chat/src/main/java/org/navgurukul/chat/core/repo/ActiveSessionDataSource.kt @@ -2,6 +2,6 @@ package org.navgurukul.chat.core.repo import arrow.core.Option import org.matrix.android.sdk.api.session.Session -import org.navgurukul.chat.core.utils.BehaviorDataSource +import org.merakilearn.core.utils.BehaviorDataSource class ActiveSessionDataSource : BehaviorDataSource>() diff --git a/chat/src/main/java/org/navgurukul/chat/core/repo/AuthenticationRepository.kt b/chat/src/main/java/org/navgurukul/chat/core/repo/AuthenticationRepository.kt index 6e69b6dae..b2903ad40 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/repo/AuthenticationRepository.kt +++ b/chat/src/main/java/org/navgurukul/chat/core/repo/AuthenticationRepository.kt @@ -13,7 +13,7 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.navgurukul.chat.R import org.navgurukul.chat.core.extensions.configureAndStart -import org.navgurukul.chat.core.utils.deleteAllFiles +import org.merakilearn.core.utils.deleteAllFiles import org.navgurukul.chat.features.settings.ChatPreferences import org.navgurukul.commonui.resources.StringProvider import kotlin.coroutines.resume diff --git a/chat/src/main/java/org/navgurukul/chat/features/grouplist/SelectedGroupDataSource.kt b/chat/src/main/java/org/navgurukul/chat/features/grouplist/SelectedGroupDataSource.kt index 78c915db6..1d8c92fb3 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/grouplist/SelectedGroupDataSource.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/grouplist/SelectedGroupDataSource.kt @@ -2,6 +2,6 @@ package org.navgurukul.chat.features.grouplist import arrow.core.Option import org.matrix.android.sdk.api.session.group.model.GroupSummary -import org.navgurukul.chat.core.utils.BehaviorDataSource +import org.merakilearn.core.utils.BehaviorDataSource class SelectedGroupDataSource : BehaviorDataSource>(Option.empty()) diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/AvatarRenderer.kt b/chat/src/main/java/org/navgurukul/chat/features/home/AvatarRenderer.kt index df71f643d..c09a2b359 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/AvatarRenderer.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/AvatarRenderer.kt @@ -18,8 +18,8 @@ import org.navgurukul.chat.core.glide.GlideApp import org.navgurukul.chat.core.glide.GlideRequest import org.navgurukul.chat.core.glide.GlideRequests import org.navgurukul.chat.core.repo.ActiveSessionHolder -import org.navgurukul.chat.core.utils.getColorFromRoomId -import org.navgurukul.chat.core.utils.getColorFromUserId +import org.merakilearn.core.utils.getColorFromRoomId +import org.merakilearn.core.utils.getColorFromUserId /** * This helper centralise ways to retrieve avatar into ImageView or even generic Target diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/HomeRoomListDataSource.kt b/chat/src/main/java/org/navgurukul/chat/features/home/HomeRoomListDataSource.kt index 9b57024a4..230f35982 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/HomeRoomListDataSource.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/HomeRoomListDataSource.kt @@ -1,6 +1,6 @@ package org.navgurukul.chat.features.home import org.matrix.android.sdk.api.session.room.model.RoomSummary -import org.navgurukul.chat.core.utils.BehaviorDataSource +import org.merakilearn.core.utils.BehaviorDataSource class HomeRoomListDataSource : BehaviorDataSource>() diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/JumpToBottomViewVisibilityManager.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/JumpToBottomViewVisibilityManager.kt index e4cf8f77e..b8d09923d 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/JumpToBottomViewVisibilityManager.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/JumpToBottomViewVisibilityManager.kt @@ -3,7 +3,7 @@ package org.navgurukul.chat.features.home.room.detail import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.google.android.material.floatingactionbutton.FloatingActionButton -import org.navgurukul.chat.core.utils.Debouncer +import org.merakilearn.core.utils.Debouncer /** * Show or hide the jumpToBottomView, depending on the scrolling and if the timeline is displaying the more recent event diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/RoomDetailFragment.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/RoomDetailFragment.kt index b66dd61e3..3bcb345c9 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/RoomDetailFragment.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/RoomDetailFragment.kt @@ -46,8 +46,6 @@ import kotlinx.android.synthetic.main.merge_composer_layout.view.* import org.commonmark.parser.Parser import org.koin.android.ext.android.inject import org.koin.androidx.scope.fragmentScope -import org.koin.androidx.scope.lifecycleScope -import org.koin.androidx.scope.scope import org.koin.androidx.viewmodel.ext.android.viewModel import org.koin.core.parameter.parametersOf import org.koin.core.scope.KoinScopeComponent @@ -59,8 +57,8 @@ import org.navgurukul.chat.core.dialogs.withColoredButton import org.navgurukul.chat.core.extensions.* import org.navgurukul.chat.core.glide.GlideApp import org.navgurukul.chat.core.repo.ActiveSessionHolder -import org.navgurukul.chat.core.utils.* -import org.navgurukul.chat.core.utils.createUIHandler +import org.merakilearn.core.utils.* +import org.merakilearn.core.utils.createUIHandler import org.navgurukul.chat.core.views.NotificationAreaView import org.navgurukul.chat.features.home.AvatarRenderer import org.navgurukul.chat.features.home.room.detail.composer.TextComposerView diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/RoomDetailFragmentViewModel.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/RoomDetailFragmentViewModel.kt index 437b09224..ebea03d98 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/RoomDetailFragmentViewModel.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/RoomDetailFragmentViewModel.kt @@ -36,8 +36,8 @@ import org.matrix.android.sdk.api.session.room.timeline.* import org.navgurukul.chat.R import org.navgurukul.chat.core.repo.ActiveSessionHolder import org.navgurukul.chat.core.resources.UserPreferencesProvider -import org.navgurukul.chat.core.utils.isValidUrl -import org.navgurukul.chat.core.utils.subscribeLogError +import org.merakilearn.core.utils.isValidUrl +import org.merakilearn.core.utils.subscribeLogError import org.navgurukul.chat.features.command.CommandParser import org.navgurukul.chat.features.command.ParsedCommand import org.navgurukul.chat.features.home.room.TypingHelper diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/MessageColorProvider.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/MessageColorProvider.kt index beebadbb1..2aa83dca6 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/MessageColorProvider.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/MessageColorProvider.kt @@ -4,7 +4,7 @@ import androidx.annotation.ColorInt import org.matrix.android.sdk.api.session.room.send.SendState import org.navgurukul.chat.R import org.navgurukul.chat.core.resources.ColorProvider -import org.navgurukul.chat.core.utils.getColorFromUserId +import org.merakilearn.core.utils.getColorFromUserId class MessageColorProvider( private val colorProvider: ColorProvider diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/action/MessageActionsBottomSheet.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/action/MessageActionsBottomSheet.kt index 9ec63c95e..5e8530590 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/action/MessageActionsBottomSheet.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/action/MessageActionsBottomSheet.kt @@ -14,7 +14,6 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment import kotlinx.android.parcel.Parcelize import kotlinx.android.synthetic.main.bottom_sheet_generic_list.* import org.koin.android.ext.android.inject -import org.koin.androidx.scope.lifecycleScope import org.koin.androidx.viewmodel.ext.android.viewModel import org.koin.core.parameter.parametersOf import org.koin.core.scope.KoinScopeComponent @@ -23,7 +22,7 @@ import org.navgurukul.chat.core.extensions.KEY_ARG import org.navgurukul.chat.core.extensions.args import org.navgurukul.chat.core.extensions.cleanup import org.navgurukul.chat.core.extensions.configureWith -import org.navgurukul.chat.core.utils.DimensionConverter +import org.merakilearn.core.utils.DimensionConverter import org.navgurukul.chat.features.home.room.detail.timeline.item.MessageInformationData @Parcelize diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/factory/MessageItemFactory.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/factory/MessageItemFactory.kt index 2198a7c83..45df4c06b 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/factory/MessageItemFactory.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/factory/MessageItemFactory.kt @@ -20,10 +20,10 @@ import org.navgurukul.chat.R import org.navgurukul.chat.core.epoxy.MerakiEpoxyModel import org.navgurukul.chat.core.repo.ActiveSessionHolder import org.navgurukul.chat.core.resources.ColorProvider -import org.navgurukul.chat.core.utils.DebouncedClickListener -import org.navgurukul.chat.core.utils.DimensionConverter -import org.navgurukul.chat.core.utils.containsOnlyEmojis -import org.navgurukul.chat.core.utils.isLocalFile +import org.merakilearn.core.utils.DebouncedClickListener +import org.merakilearn.core.utils.DimensionConverter +import org.merakilearn.core.utils.containsOnlyEmojis +import org.merakilearn.core.utils.isLocalFile import org.navgurukul.chat.features.home.room.detail.timeline.TimelineEventController import org.navgurukul.chat.features.home.room.detail.timeline.helper.* import org.navgurukul.chat.features.home.room.detail.timeline.item.* diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/AvatarSizeProvider.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/AvatarSizeProvider.kt index c34202011..2dbff7f63 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/AvatarSizeProvider.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/AvatarSizeProvider.kt @@ -1,6 +1,6 @@ package org.navgurukul.chat.features.home.room.detail.timeline.helper -import org.navgurukul.chat.core.utils.DimensionConverter +import org.merakilearn.core.utils.DimensionConverter class AvatarSizeProvider(private val dimensionConverter: DimensionConverter) { diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/ContentUploadStateTrackerBinder.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/ContentUploadStateTrackerBinder.kt index 9aa71211a..0f1c81e35 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/ContentUploadStateTrackerBinder.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/ContentUploadStateTrackerBinder.kt @@ -9,7 +9,7 @@ import org.matrix.android.sdk.api.session.content.ContentUploadStateTracker import org.matrix.android.sdk.api.session.room.send.SendState import org.navgurukul.chat.R import org.navgurukul.chat.core.repo.ActiveSessionHolder -import org.navgurukul.chat.core.utils.TextUtils.formatFileSize +import org.merakilearn.core.utils.TextUtils.formatFileSize import org.navgurukul.chat.features.home.room.detail.timeline.MessageColorProvider import org.navgurukul.commonui.error.ErrorFormatter diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/MessageItemAttributesFactory.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/MessageItemAttributesFactory.kt index 265a23ea3..2f2c0aa22 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/MessageItemAttributesFactory.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/helper/MessageItemAttributesFactory.kt @@ -2,7 +2,7 @@ package org.navgurukul.chat.features.home.room.detail.timeline.helper import android.view.View import org.navgurukul.chat.EmojiCompatFontProvider -import org.navgurukul.chat.core.utils.DebouncedClickListener +import org.merakilearn.core.utils.DebouncedClickListener import org.navgurukul.chat.features.home.AvatarRenderer import org.navgurukul.chat.features.home.room.detail.timeline.MessageColorProvider import org.navgurukul.chat.features.home.room.detail.timeline.TimelineEventController diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/AbsMessageItem.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/AbsMessageItem.kt index 2265dcc62..bc6747a88 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/AbsMessageItem.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/AbsMessageItem.kt @@ -8,7 +8,7 @@ import android.widget.TextView import androidx.annotation.IdRes import com.airbnb.epoxy.EpoxyAttribute import org.navgurukul.chat.R -import org.navgurukul.chat.core.utils.DebouncedClickListener +import org.merakilearn.core.utils.DebouncedClickListener import org.navgurukul.chat.features.home.AvatarRenderer import org.navgurukul.chat.features.home.room.detail.timeline.MessageColorProvider import org.navgurukul.chat.features.home.room.detail.timeline.TimelineEventController diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/BaseEventItem.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/BaseEventItem.kt index 818bd89cb..7de12bf00 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/BaseEventItem.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/BaseEventItem.kt @@ -2,16 +2,12 @@ package org.navgurukul.chat.features.home.room.detail.timeline.item import android.view.View import android.view.ViewStub -import android.widget.RelativeLayout import androidx.annotation.CallSuper import androidx.annotation.IdRes -import androidx.core.view.updateLayoutParams import com.airbnb.epoxy.EpoxyAttribute -import org.navgurukul.chat.R import org.navgurukul.chat.core.epoxy.MerakiEpoxyHolder import org.navgurukul.chat.core.epoxy.MerakiEpoxyModel -import org.navgurukul.chat.core.utils.DimensionConverter -import org.navgurukul.commonui.platform.CheckableView +import org.merakilearn.core.utils.DimensionConverter /** * Children must override getViewType() diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/DefaultItem.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/DefaultItem.kt index b12a6a73d..95324c9eb 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/DefaultItem.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/DefaultItem.kt @@ -6,9 +6,7 @@ import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass import org.navgurukul.chat.R -import org.navgurukul.chat.core.utils.DebouncedClickListener import org.navgurukul.chat.features.home.AvatarRenderer -import org.navgurukul.chat.features.home.room.detail.timeline.TimelineEventController @EpoxyModelClass abstract class DefaultItem : BaseEventItem() { diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/NoticeItem.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/NoticeItem.kt index 142213df1..4fbad1dcb 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/NoticeItem.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/item/NoticeItem.kt @@ -3,15 +3,12 @@ package org.navgurukul.chat.features.home.room.detail.timeline.item import android.view.View import android.widget.ImageView import android.widget.TextView -import androidx.core.view.isVisible import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass import org.navgurukul.chat.R import org.navgurukul.chat.core.epoxy.ClickListener import org.navgurukul.chat.core.epoxy.onClick -import org.navgurukul.chat.core.utils.DebouncedClickListener import org.navgurukul.chat.features.home.AvatarRenderer -import org.navgurukul.chat.features.home.room.detail.timeline.TimelineEventController @EpoxyModelClass abstract class NoticeItem : BaseEventItem() { diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/tools/EventRenderingTools.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/tools/EventRenderingTools.kt index 8d524e56a..4c449e93a 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/tools/EventRenderingTools.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/detail/timeline/tools/EventRenderingTools.kt @@ -12,8 +12,8 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.navgurukul.chat.core.linkify.SaralLinkify -import org.navgurukul.chat.core.utils.EvenBetterLinkMovementMethod -import org.navgurukul.chat.core.utils.isValidUrl +import org.merakilearn.core.utils.EvenBetterLinkMovementMethod +import org.merakilearn.core.utils.isValidUrl import org.navgurukul.chat.features.home.room.detail.timeline.TimelineEventController import org.navgurukul.chat.features.html.PillImageSpan diff --git a/chat/src/main/java/org/navgurukul/chat/features/home/room/list/RoomSummaryItemFactory.kt b/chat/src/main/java/org/navgurukul/chat/features/home/room/list/RoomSummaryItemFactory.kt index 5eea23f78..54a8d4c61 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/home/room/list/RoomSummaryItemFactory.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/home/room/list/RoomSummaryItemFactory.kt @@ -22,7 +22,7 @@ import org.matrix.android.sdk.api.util.toMatrixItem import org.navgurukul.chat.core.date.SaralDateFormatter import org.navgurukul.chat.core.extensions.localDateTime import org.navgurukul.chat.core.resources.DateProvider -import org.navgurukul.chat.core.utils.DebouncedClickListener +import org.merakilearn.core.utils.DebouncedClickListener import org.navgurukul.chat.features.home.AvatarRenderer import org.navgurukul.chat.features.home.room.TypingHelper import org.navgurukul.chat.features.home.room.format.DisplayableEventFormatter diff --git a/chat/src/main/java/org/navgurukul/chat/features/media/ImageContentRenderer.kt b/chat/src/main/java/org/navgurukul/chat/features/media/ImageContentRenderer.kt index 3b751a0b8..edf50a134 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/media/ImageContentRenderer.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/media/ImageContentRenderer.kt @@ -18,8 +18,8 @@ import org.navgurukul.chat.R import org.navgurukul.chat.core.glide.GlideApp import org.navgurukul.chat.core.glide.GlideRequest import org.navgurukul.chat.core.repo.ActiveSessionHolder -import org.navgurukul.chat.core.utils.DimensionConverter -import org.navgurukul.chat.core.utils.isLocalFile +import org.merakilearn.core.utils.DimensionConverter +import org.merakilearn.core.utils.isLocalFile import kotlin.math.min diff --git a/chat/src/main/java/org/navgurukul/chat/features/media/MerakiAttachmentViewerActivity.kt b/chat/src/main/java/org/navgurukul/chat/features/media/MerakiAttachmentViewerActivity.kt index a01ad641a..e0cf6e275 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/media/MerakiAttachmentViewerActivity.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/media/MerakiAttachmentViewerActivity.kt @@ -19,7 +19,7 @@ import org.koin.android.ext.android.inject import org.navgurukul.chat.R import org.navgurukul.chat.core.intent.getMimeTypeFromUri import org.navgurukul.chat.core.repo.ActiveSessionHolder -import org.navgurukul.chat.core.utils.shareMedia +import org.merakilearn.core.utils.shareMedia import org.navgurukul.chat.features.attachmentviewer.AttachmentCommands import org.navgurukul.chat.features.attachmentviewer.AttachmentViewerActivity import timber.log.Timber diff --git a/chat/src/main/java/org/navgurukul/chat/features/notifications/NotificationUtils.kt b/chat/src/main/java/org/navgurukul/chat/features/notifications/NotificationUtils.kt index 713a28067..2e1efd152 100755 --- a/chat/src/main/java/org/navgurukul/chat/features/notifications/NotificationUtils.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/notifications/NotificationUtils.kt @@ -18,7 +18,7 @@ import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import org.merakilearn.core.navigator.MerakiNavigator import org.navgurukul.chat.R -import org.navgurukul.chat.core.utils.startNotificationChannelSettingsIntent +import org.merakilearn.core.utils.startNotificationChannelSettingsIntent import org.navgurukul.chat.features.settings.ChatPreferences import org.navgurukul.commonui.resources.StringProvider import timber.log.Timber diff --git a/chat/src/main/java/org/navgurukul/chat/features/reactions/widget/ReactionButton.kt b/chat/src/main/java/org/navgurukul/chat/features/reactions/widget/ReactionButton.kt index ba0129f28..37c3a21a4 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/reactions/widget/ReactionButton.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/reactions/widget/ReactionButton.kt @@ -23,7 +23,7 @@ import androidx.core.content.withStyledAttributes import org.koin.java.KoinJavaComponent.inject import org.navgurukul.chat.EmojiCompatWrapper import org.navgurukul.chat.R -import org.navgurukul.chat.core.utils.TextUtils +import org.merakilearn.core.utils.TextUtils /** * An animated reaction button. diff --git a/chat/src/main/java/org/navgurukul/chat/features/sync/SyncStateView.kt b/chat/src/main/java/org/navgurukul/chat/features/sync/SyncStateView.kt index cef96e494..4bcde028c 100644 --- a/chat/src/main/java/org/navgurukul/chat/features/sync/SyncStateView.kt +++ b/chat/src/main/java/org/navgurukul/chat/features/sync/SyncStateView.kt @@ -8,7 +8,7 @@ import androidx.core.view.isVisible import org.matrix.android.sdk.api.session.sync.SyncState import kotlinx.android.synthetic.main.view_sync_state.view.* import org.navgurukul.chat.R -import org.navgurukul.chat.core.utils.isAirplaneModeOn +import org.merakilearn.core.utils.isAirplaneModeOn class SyncStateView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) : FrameLayout(context, attrs, defStyle) { diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/DataSource.kt b/core/src/main/java/org/merakilearn/core/utils/DataSource.kt similarity index 100% rename from chat/src/main/java/org/navgurukul/chat/core/utils/DataSource.kt rename to core/src/main/java/org/merakilearn/core/utils/DataSource.kt diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/DebouncedClickListener.kt b/core/src/main/java/org/merakilearn/core/utils/DebouncedClickListener.kt similarity index 94% rename from chat/src/main/java/org/navgurukul/chat/core/utils/DebouncedClickListener.kt rename to core/src/main/java/org/merakilearn/core/utils/DebouncedClickListener.kt index e015f2a94..dd67d5f63 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/DebouncedClickListener.kt +++ b/core/src/main/java/org/merakilearn/core/utils/DebouncedClickListener.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import android.view.View import java.util.* diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/Debouncer.kt b/core/src/main/java/org/merakilearn/core/utils/Debouncer.kt similarity index 96% rename from chat/src/main/java/org/navgurukul/chat/core/utils/Debouncer.kt rename to core/src/main/java/org/merakilearn/core/utils/Debouncer.kt index aa05c9111..8b8b91d18 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/Debouncer.kt +++ b/core/src/main/java/org/merakilearn/core/utils/Debouncer.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import android.os.Handler diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/DefaultSubscriber.kt b/core/src/main/java/org/merakilearn/core/utils/DefaultSubscriber.kt similarity index 96% rename from chat/src/main/java/org/navgurukul/chat/core/utils/DefaultSubscriber.kt rename to core/src/main/java/org/merakilearn/core/utils/DefaultSubscriber.kt index 4a37eb3e8..a43ac9d4e 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/DefaultSubscriber.kt +++ b/core/src/main/java/org/merakilearn/core/utils/DefaultSubscriber.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import io.reactivex.Completable import io.reactivex.Single diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/DimensionConverter.kt b/core/src/main/java/org/merakilearn/core/utils/DimensionConverter.kt similarity index 94% rename from chat/src/main/java/org/navgurukul/chat/core/utils/DimensionConverter.kt rename to core/src/main/java/org/merakilearn/core/utils/DimensionConverter.kt index c61593068..b5fa94edf 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/DimensionConverter.kt +++ b/core/src/main/java/org/merakilearn/core/utils/DimensionConverter.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import android.content.res.Resources import android.util.TypedValue diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/Emoji.kt b/core/src/main/java/org/merakilearn/core/utils/Emoji.kt similarity index 99% rename from chat/src/main/java/org/navgurukul/chat/core/utils/Emoji.kt rename to core/src/main/java/org/merakilearn/core/utils/Emoji.kt index 8b67c3d37..8c201e4ef 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/Emoji.kt +++ b/core/src/main/java/org/merakilearn/core/utils/Emoji.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import java.util.regex.Pattern diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/EvenBetterLinkMovementMethod.kt b/core/src/main/java/org/merakilearn/core/utils/EvenBetterLinkMovementMethod.kt similarity index 97% rename from chat/src/main/java/org/navgurukul/chat/core/utils/EvenBetterLinkMovementMethod.kt rename to core/src/main/java/org/merakilearn/core/utils/EvenBetterLinkMovementMethod.kt index abd09fbfb..aed2f1942 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/EvenBetterLinkMovementMethod.kt +++ b/core/src/main/java/org/merakilearn/core/utils/EvenBetterLinkMovementMethod.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import android.text.Spanned import android.text.style.ClickableSpan diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/ExternalApplicationsUtil.kt b/core/src/main/java/org/merakilearn/core/utils/ExternalApplicationsUtil.kt similarity index 98% rename from chat/src/main/java/org/navgurukul/chat/core/utils/ExternalApplicationsUtil.kt rename to core/src/main/java/org/merakilearn/core/utils/ExternalApplicationsUtil.kt index 4d7ed48b1..7d87e3518 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/ExternalApplicationsUtil.kt +++ b/core/src/main/java/org/merakilearn/core/utils/ExternalApplicationsUtil.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import android.content.ActivityNotFoundException import android.content.Context diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/FileUtils.kt b/core/src/main/java/org/merakilearn/core/utils/FileUtils.kt similarity index 98% rename from chat/src/main/java/org/navgurukul/chat/core/utils/FileUtils.kt rename to core/src/main/java/org/merakilearn/core/utils/FileUtils.kt index d2b3b5282..0ad00a03f 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/FileUtils.kt +++ b/core/src/main/java/org/merakilearn/core/utils/FileUtils.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import timber.log.Timber import java.io.File diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/Handler.kt b/core/src/main/java/org/merakilearn/core/utils/Handler.kt similarity index 95% rename from chat/src/main/java/org/navgurukul/chat/core/utils/Handler.kt rename to core/src/main/java/org/merakilearn/core/utils/Handler.kt index d857bf7c1..9967fbcb9 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/Handler.kt +++ b/core/src/main/java/org/merakilearn/core/utils/Handler.kt @@ -16,7 +16,7 @@ */ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import android.os.Handler import android.os.HandlerThread diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/SystemUtils.kt b/core/src/main/java/org/merakilearn/core/utils/SystemUtils.kt similarity index 99% rename from chat/src/main/java/org/navgurukul/chat/core/utils/SystemUtils.kt rename to core/src/main/java/org/merakilearn/core/utils/SystemUtils.kt index 3ebef6f96..312d5e18a 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/SystemUtils.kt +++ b/core/src/main/java/org/merakilearn/core/utils/SystemUtils.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import android.annotation.TargetApi import android.app.Activity diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/TextUtils.kt b/core/src/main/java/org/merakilearn/core/utils/TextUtils.kt similarity index 98% rename from chat/src/main/java/org/navgurukul/chat/core/utils/TextUtils.kt rename to core/src/main/java/org/merakilearn/core/utils/TextUtils.kt index 457814796..168172981 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/TextUtils.kt +++ b/core/src/main/java/org/merakilearn/core/utils/TextUtils.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import android.content.Context import android.os.Build diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/UrlUtils.kt b/core/src/main/java/org/merakilearn/core/utils/UrlUtils.kt similarity index 94% rename from chat/src/main/java/org/navgurukul/chat/core/utils/UrlUtils.kt rename to core/src/main/java/org/merakilearn/core/utils/UrlUtils.kt index b9abe135b..69e492499 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/UrlUtils.kt +++ b/core/src/main/java/org/merakilearn/core/utils/UrlUtils.kt @@ -1,4 +1,4 @@ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import java.net.URL diff --git a/chat/src/main/java/org/navgurukul/chat/core/utils/UserColor.kt b/core/src/main/java/org/merakilearn/core/utils/UserColor.kt similarity index 97% rename from chat/src/main/java/org/navgurukul/chat/core/utils/UserColor.kt rename to core/src/main/java/org/merakilearn/core/utils/UserColor.kt index 57739aa53..e48d7e0de 100644 --- a/chat/src/main/java/org/navgurukul/chat/core/utils/UserColor.kt +++ b/core/src/main/java/org/merakilearn/core/utils/UserColor.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.navgurukul.chat.core.utils +package org.merakilearn.core.utils import androidx.annotation.ColorRes import org.navgurukul.chat.R diff --git a/playground/src/main/java/org/navgurukul/playground/ui/PythonPlaygroundActivity.kt b/playground/src/main/java/org/navgurukul/playground/ui/PythonPlaygroundActivity.kt index 4bbcbbf6e..4697338b4 100644 --- a/playground/src/main/java/org/navgurukul/playground/ui/PythonPlaygroundActivity.kt +++ b/playground/src/main/java/org/navgurukul/playground/ui/PythonPlaygroundActivity.kt @@ -27,6 +27,7 @@ import org.koin.android.ext.android.inject import org.koin.androidx.viewmodel.ext.android.viewModel import org.merakilearn.core.navigator.ChatModuleNavigator import org.merakilearn.core.navigator.MerakiNavigator +import org.merakilearn.core.utils.copyToClipboard import org.navgurukul.playground.R import org.navgurukul.playground.custom.addTextAtCursorPosition import java.io.File @@ -396,6 +397,7 @@ class PythonPlaygroundActivity : AppCompatActivity() { errorLayout.visibility = GONE findViewById(R.id.copy_btn).setOnClickListener { + copyToClipboard(this, tvError.text.toString()) Toast.makeText(this, "Copied !!", Toast.LENGTH_SHORT).show() } @@ -551,22 +553,6 @@ class PythonPlaygroundActivity : AppCompatActivity() { } - // ============================================================================================================== - // Clipboard helper - // ============================================================================================================== - - /** - * Copy a text to the clipboard, and display a Toast when done - * - * @param context the context - * @param text the text to copy - */ - fun copyToClipboard(context: Context, text: CharSequence) { - val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager - clipboard.setPrimaryClip(ClipData.newPlainText("Meraki", text)) - } - - private fun output(text: CharSequence) { tvOutput.append(text) }