Skip to content

Commit

Permalink
comments and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
carlpoole committed Mar 12, 2024
1 parent 77c2dc4 commit 3ff1568
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 10 additions & 4 deletions IonicPortals/src/main/kotlin/io/ionic/portals/DevConfiguration.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package io.ionic.portals

import android.annotation.SuppressLint
import android.content.Context
import com.getcapacitor.CapConfig
import com.getcapacitor.Logger

/**
* This class is used to load the server URL and Capacitor configuration from the assets folder when the app
* is being run in developer mode with the Portals CLI.
*/
object DevConfiguration {

@SuppressLint("PrivateApi")
/**
* Get the server URL for the given portal name from the developer mode assets folder.
*/
fun getServerUrl(context: Context, portalName: String): String? {
val portalDirName = "$portalName.debug"
val generalDirName = "portal.debug"
Expand Down Expand Up @@ -35,7 +39,9 @@ object DevConfiguration {
return serverUrl
}

@SuppressLint("PrivateApi")
/**
* Get the Capacitor configuration for the given portal name from the developer mode assets folder.
*/
fun getCapacitorConfig(context: Context, portalName: String): CapConfig? {
val portalDirName = "$portalName.debug"
val generalDirName = "portal.debug"
Expand Down
2 changes: 0 additions & 2 deletions IonicPortals/src/main/kotlin/io/ionic/portals/PortalView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import android.graphics.Canvas
import android.os.Build
import android.os.Handler
import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.WindowInsets
import android.widget.FrameLayout
Expand Down

0 comments on commit 3ff1568

Please sign in to comment.