Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "41a50b7fab10cb07ddedc8846a9b55f5",
"identityHash": "80ed17c12fe7718613ca933e0b480ce5",
"entities": [
{
"tableName": "concepts",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER, `name` TEXT, `uuid` TEXT, `display` TEXT, `_id` INTEGER, `datatype_uuid` TEXT, `datatype_display` TEXT, `datatype__id` INTEGER, PRIMARY KEY(`id`))",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT, `uuid` TEXT, `display` TEXT, `_id` INTEGER PRIMARY KEY AUTOINCREMENT, `datatype_uuid` TEXT, `datatype_display` TEXT, `datatype__id` INTEGER)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "name",
"columnName": "name",
Expand Down Expand Up @@ -59,9 +53,9 @@
],
"primaryKey": {
"columnNames": [
"id"
"_id"
],
"autoGenerate": false
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
Expand Down Expand Up @@ -536,7 +530,7 @@
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"41a50b7fab10cb07ddedc8846a9b55f5\")"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"80ed17c12fe7718613ca933e0b480ce5\")"
]
}
}
2 changes: 1 addition & 1 deletion openmrs-client/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
android:theme="@style/AppThemeOrig"
android:label="@string/contact_us"/>

<meta-data
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${GOOGLE_PLACE_API_KEY}"/>
<meta-data
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* The contents of this file are subject to the OpenMRS Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://license.openmrs.org
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*
* Copyright (C) OpenMRS, LLC. All Rights Reserved.
*/
package org.openmrs.mobile.activities.community.contact

import android.content.ActivityNotFoundException
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import org.openmrs.mobile.R
import org.openmrs.mobile.activities.ACBaseActivity
import org.openmrs.mobile.databinding.ActvityContactUsBinding
import org.openmrs.mobile.utilities.ToastUtil

class ContactUsActivity : ACBaseActivity(), ContactUsContract.View {

var presenter: ContactUsContract.Presenter? = null
private lateinit var binding: ActvityContactUsBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActvityContactUsBinding.inflate(layoutInflater)
setContentView(binding.root)
presenter = ContactUsPresenter()

val actionBar = supportActionBar
if (actionBar != null) {
actionBar.elevation = 0f
actionBar.setDisplayHomeAsUpEnabled(true)
}

binding.emailLayout.setOnClickListener {
val sendMailIntent = Intent(Intent.ACTION_SENDTO)
val mailTo = "mailto:" + binding.contactEmailText.text.toString()
sendMailIntent.data = Uri.parse(mailTo)
try {
startActivity(sendMailIntent)
} catch (ex: ActivityNotFoundException) {
ToastUtil.showShortToast(this, ToastUtil.ToastType.ERROR, getString(R.string.no_mailing_client_found))
}
}

binding.forumLayout.setOnClickListener {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.contact_forum_url)))
startActivity(intent)
}

binding.ircLayout.setOnClickListener {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.contact_irc_url)))
startActivity(intent)
}
}

override fun onCreateOptionsMenu(menu: Menu): Boolean {
super.onCreateOptionsMenu(menu)
//Disable Contact Option in Menu
val contactItem = menu.findItem(R.id.actionContact)
contactItem.isVisible = false
val logOutItem = menu.findItem(R.id.actionLogout)
logOutItem.isVisible = false
val locationItem = menu.findItem(R.id.actionLocation)
locationItem.isVisible = false
val settingItem = menu.findItem(R.id.actionSettings)
settingItem.isVisible = false
return true
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == android.R.id.home) {
finish()
return true
}
return super.onOptionsItemSelected(item)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@
* Copyright (C) OpenMRS, LLC. All Rights Reserved.
*/

package org.openmrs.mobile.activities.community.contact;
package org.openmrs.mobile.activities.community.contact

public class ContactUsContract {
interface View {
}

interface Presenter {
}
}
class ContactUsContract {
interface View
interface Presenter
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
* Copyright (C) OpenMRS, LLC. All Rights Reserved.
*/

package org.openmrs.mobile.activities.community.contact;
package org.openmrs.mobile.activities.community.contact

public class ContactUsPresenter implements ContactUsContract.Presenter {
ContactUsContract.View contactUsView;

public ContactUsPresenter(ContactUsContract.View contactUsView) {
this.contactUsView = contactUsView;
}
}
class ContactUsPresenter : ContactUsContract.Presenter