Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Max#cache mensagens #199

Closed
wants to merge 103 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
ae3d062
notification enabled/disabled option
netochaves May 29, 2019
57c13e3
set orientation to portrait only
netochaves May 29, 2019
a91907b
Persistencia de troca de visualização da lingua da mensagem
Mex978 May 29, 2019
6c8026b
Ajustes de erro de digitação e troca do nome da prop
Mex978 May 29, 2019
81728a6
Mais ajustes
Mex978 May 29, 2019
17e00b5
Função para gerar cor criada
Mex978 May 29, 2019
b31d5da
Indicação da prop para mostrar o nome do usuário
Mex978 May 29, 2019
418bc31
Componente atualizado para grupos
Mex978 May 29, 2019
6684b8f
Adicionada limitação de envio de imagem para 600kB
Mex978 May 29, 2019
af28fc4
Adicionado na tela de criação de perfil
Mex978 May 29, 2019
dd9630b
Adicionada função de dar share do aplicativo para os amigos :)
sosolidkk May 29, 2019
141635e
Adicionada foto padrão caso o usuário não escolha
Mex978 May 29, 2019
f8f93c9
Criado componente de header para tela de idiomas ao invés de setar no…
sosolidkk May 29, 2019
7c4d10d
Removido variável que não estava em uso na função changeLanguage
sosolidkk May 29, 2019
4325eb4
Adicionada lógica do botão de voltar no componente de Idiomas.
sosolidkk May 29, 2019
3843fac
Adicionado click no checkBox pois o mesmo não estava funcionando, alt…
sosolidkk May 30, 2019
a6ad34d
Configuração inicial da rota e botão para tela de Sobre.
sosolidkk May 30, 2019
aa15074
Criado esqueleto inicial da tela de sobre com os cards de devs
sosolidkk May 30, 2019
8e15b29
set icon
netochaves May 31, 2019
8fb4a25
create splash screen
netochaves May 31, 2019
d6fd645
Set icon notification
netochaves May 31, 2019
3849dee
Criado componente para Conversas
Mex978 May 31, 2019
256bb9d
Criado componente para contatos + ajustes
Mex978 May 31, 2019
0dfd70f
Instalado modulo platform-touchable
Mex978 May 31, 2019
8cd094f
Efeito de click no componente conversa
Mex978 May 31, 2019
13b2851
Efeito de clique no search em conversas
Mex978 May 31, 2019
840560b
Animações nos botoes e ajuste na estilização
Mex978 May 31, 2019
6991a8a
Animação de clique no componente contato
Mex978 May 31, 2019
0c0eb6a
Animação de click no chat
Mex978 May 31, 2019
baa3adc
Animações de cliques tela de perfil e SearchBar
Mex978 May 31, 2019
459aa11
Tamanho botão voltar EditPerfil
Mex978 May 31, 2019
875754e
change icon notification, BEST ICON EVER
netochaves May 31, 2019
33902a7
update axios package
netochaves May 30, 2019
c47c2d4
Create PRIVACY-POLICY.md
sosolidkk May 31, 2019
a8d5b30
Adicionado ícone do App e profile para todos os devs participantes
sosolidkk May 31, 2019
6e55441
Create PRIVACY-POLICY.md (#184)
netochaves Jun 1, 2019
383ac2f
Criado componente para o Header, Botão de Voltar, Componente para car…
sosolidkk Jun 1, 2019
dade853
Adicionado HyperLinks para cada ícone e para a licença novamente.
sosolidkk Jun 1, 2019
462c25e
fix bug 142 and refactor routes
netochaves Jun 1, 2019
7c240a4
Adicionada função de ir para as políticas de privacidade do App.
sosolidkk Jun 1, 2019
a2f642f
Merge branch 'dev' into neto#fixVunerabilityAxios
sosolidkk Jun 1, 2019
b7afd66
Merge pull request #183 from ES2-UFPI/neto#fixVunerabilityAxios
sosolidkk Jun 1, 2019
2dd084d
Merge branch 'dev' into max#verIdiomaOriginal
netochaves Jun 1, 2019
90b258e
Merge branch 'dev' into max#componenteParaGrupo
netochaves Jun 1, 2019
0585f45
Max#ver idioma original (#171)
netochaves Jun 1, 2019
38e0624
Merge branch 'dev' into jpe#shareUnichat
netochaves Jun 1, 2019
9702205
Merge branch 'dev' into jpe#createLanguagesHeader
netochaves Jun 1, 2019
1fb1dad
Adicionada função de dar share do aplicativo para os amigos :) (#174)
netochaves Jun 1, 2019
61c6fad
Merge branch 'dev' into jpe#privacyPolicy
netochaves Jun 1, 2019
d263a23
Merge branch 'dev' into jpe#createLanguagesHeader
netochaves Jun 1, 2019
3ef3ee2
Conflitos resolvidos
Mex978 Jun 1, 2019
7f47c0c
Conflitos resolvidos
Mex978 Jun 1, 2019
ce5bea2
Idiomas - LanguagesHeader (#177)
netochaves Jun 1, 2019
b7d5bd5
Merge branch 'dev' into jpe#privacyPolicy
netochaves Jun 1, 2019
2538592
Merge branch 'dev' into max#limitarImagem
netochaves Jun 1, 2019
d92f08a
Merge branch 'dev' into max#componenteParaGrupo
netochaves Jun 1, 2019
d8eea26
Políticas de Privacidade (#187)
netochaves Jun 1, 2019
7690ba2
merge dev and solve conflicts
netochaves Jun 1, 2019
a7ced9c
fiz error
netochaves Jun 1, 2019
b43df12
Merge branch 'dev' into max#componenteParaGrupo
netochaves Jun 1, 2019
acc0295
Max#componente para grupo (#172)
netochaves Jun 1, 2019
7eb9628
Merge branch 'dev' into neto#bugPN142
sosolidkk Jun 1, 2019
a10d287
Merge pull request #186 from ES2-UFPI/neto#bugPN142
sosolidkk Jun 1, 2019
4ca9a57
Merge branch 'dev' into neto#pushNotificationsEnable/Disable
netochaves Jun 1, 2019
c431836
solve conflicts
netochaves Jun 1, 2019
cb18ed4
Merge pull request #169 from ES2-UFPI/neto#pushNotificationsEnable/Di…
sosolidkk Jun 1, 2019
45e9f6c
Merge branch 'dev' into neto#165
sosolidkk Jun 1, 2019
35fbf2b
Merge pull request #170 from ES2-UFPI/neto#165
sosolidkk Jun 1, 2019
491b92f
fix header
netochaves Jun 1, 2019
9091b6c
merge dev and conflicts
netochaves Jun 1, 2019
8bb6271
Merge branch 'dev' into max#warningFotoVazia
sosolidkk Jun 1, 2019
ab14c9e
Merge branch 'dev' into max#limitarImagem
netochaves Jun 1, 2019
d33197c
Jpe#about screen (#185)
netochaves Jun 2, 2019
1cc6c92
Merge branch 'dev' into max#limitarImagem
netochaves Jun 2, 2019
5cdd5c5
Merge branch 'dev' into max#warningFotoVazia
sosolidkk Jun 2, 2019
ad1c595
Max#limitar imagem (#173)
netochaves Jun 2, 2019
b516b67
Merge branch 'dev' into max#warningFotoVazia
sosolidkk Jun 2, 2019
bb638b8
Merge pull request #175 from ES2-UFPI/max#warningFotoVazia
sosolidkk Jun 2, 2019
dad7930
Merge branch 'dev' into neto#IconAndSplashScreen
sosolidkk Jun 2, 2019
2e171c9
fix bug in listener of username and photo
netochaves Jun 2, 2019
2868de6
fix state update in unmounted component
netochaves Jun 3, 2019
83a0fdc
now i fixed u baby
netochaves Jun 4, 2019
c5ffd7d
Merge pull request #180 from ES2-UFPI/neto#IconAndSplashScreen
sosolidkk Jun 4, 2019
4d15d97
Adicionado componente header 'transparente' para a tela de previewImage
sosolidkk Jun 5, 2019
2357d3b
Alinhado o titulo da tela de idiomas a esquerda
sosolidkk Jun 5, 2019
27f7f86
Alinhado o titulo da tela de sobre a esquerda
sosolidkk Jun 5, 2019
c211337
Alinhado a esquerda o titulo da tela de editarPerfil e adicionado hit…
sosolidkk Jun 5, 2019
3ae68f6
Merge branch 'dev' of https://github.com/ES2-UFPI/Unichat into max#pl…
Mex978 Jun 6, 2019
1a836e9
Merge pull request #190 from ES2-UFPI/jpe#headerTransparente
Mex978 Jun 6, 2019
494e43a
Atualizado com a dev depois do merge
Mex978 Jun 6, 2019
bf23aec
Efeito ao clicar em ver perfil do usuário
Mex978 Jun 6, 2019
bd4c6b3
Efeito na mensagem para ver a lingua original
Mex978 Jun 6, 2019
e83228d
Status bar adicionada
Mex978 Jun 6, 2019
247a594
Alterações nas telas de idiomas e perfil
Mex978 Jun 6, 2019
949ced3
Efeito de clique na tela de configurações
Mex978 Jun 6, 2019
251dad3
Mais alterações
Mex978 Jun 6, 2019
811bd1b
Ajustes finais para melhorar UX
Mex978 Jun 6, 2019
0e7dede
Update conversa.js
Mex978 Jun 6, 2019
78e2e00
Adicionados requisitos para implementação de testes
Mex978 Jun 11, 2019
73b6ce4
Adicionados requisitos para implementação de testes (#192)
netochaves Jun 11, 2019
bc86791
Merge branch 'dev' into max#platformTouchables
netochaves Jun 13, 2019
4843a07
Max#platform touchables (#182)
netochaves Jun 13, 2019
1321c26
Adicionado funcionalidade de infinity scroll
Mex978 Jun 14, 2019
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
11 changes: 0 additions & 11 deletions App.js

This file was deleted.

40 changes: 40 additions & 0 deletions PRIVACY-POLICY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Privacy Policy

[["We" or "I", or Website or App name]] takes your privacy seriously. To better protect your privacy [["we" or "I"]] provide this privacy policy notice explaining the way your personal information is collected and used.


## Collection of Routine Information

This [["website" or "app"]] track basic information about their [["visitors" or "users"]]. This information includes, but is not limited to, IP addresses, [["browser" or "app"]] details, timestamps and referring pages. None of this information can personally identify specific [["visitors" or "user"]] to this [["website" or "app"]]. The information is tracked for routine administration and maintenance purposes.


## Cookies

Where necessary, this [["website" or "app"]] uses cookies to store information about a visitor’s preferences and history in order to better serve the [["visitor" or "user"]] and/or present the [["visitor" or "user"]] with customized content.


## Advertisement and Other Third Parties

Advertising partners and other third parties may use cookies, scripts and/or web beacons to track [["visitors" or "user"]] activities on this [["website" or "app"]] in order to display advertisements and other useful information. Such tracking is done directly by the third parties through their own servers and is subject to their own privacy policies. This [["website" or "app"]] has no access or control over these cookies, scripts and/or web beacons that may be used by third parties. Learn how to [opt out of Google’s cookie usage](http://www.google.com/privacy_ads.html).


## Links to Third Party Websites

[["We" or "I"]] have included links on this [["website" or "app"]] for your use and reference. [["We" or "I"]] are not responsible for the privacy policies on these websites. You should be aware that the privacy policies of these websites may differ from [["our" or "my"]] own.


## Security

The security of your personal information is important to [["us" or "me"]], but remember that no method of transmission over the Internet, or method of electronic storage, is 100% secure. While [["we" or "I"]] strive to use commercially acceptable means to protect your personal information, [["we" or "I"]] cannot guarantee its absolute security.


## Changes To This Privacy Policy

This Privacy Policy is effective as of [[Date]] and will remain in effect except with respect to any changes in its provisions in the future, which will be in effect immediately after being posted on this page.

[["We" or "I"]] reserve the right to update or change [["our" or "my"]] Privacy Policy at any time and you should check this Privacy Policy periodically. If [["we" or "I"]] make any material changes to this Privacy Policy, [["we" or "I"]] will notify you either through the email address you have provided [["us" or "me"]], or by placing a prominent notice on [["our" or "my"]] [["website" or "app"]].


## Contact Information

For any questions or concerns regarding the privacy policy, please send [["us" or "me"]] an email to [[Contact Email Address]].
13 changes: 0 additions & 13 deletions __tests__/App-test.js

This file was deleted.

10 changes: 8 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,23 @@
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:icon="@drawable/icon"
android:allowBackup="false"
android:theme="@style/AppTheme">
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/logo_notification" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/notification_color" />
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
<activity
android:screenOrientation="portrait"
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
Expand Down
25 changes: 23 additions & 2 deletions android/app/src/main/java/com/unichat/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
package com.unichat;

import com.facebook.react.ReactActivity;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.graphics.Color;

public class MainActivity extends ReactActivity {

/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
* Returns the name of the main component registered from JavaScript. This is
* used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "Unichat";
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Set the Android background to white after 8 seconds
// to fix the splashscreen flash when the keyboard is shown
new CountDownTimer(8000, 1000) {

public void onTick(long millisUntilFinished) {
}

public void onFinish() {
getWindow().getDecorView().setBackgroundColor(Color.WHITE);
}

}.start();
}
}
Binary file added android/app/src/main/res/drawable-hdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/drawable-ldpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/drawable-mdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/drawable-xhdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions android/app/src/main/res/drawable/background_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/primary" />
<item
android:width="200dp"
android:height="200dp"
android:drawable="@drawable/logo"
android:gravity="center"
/>
</layer-list>
Binary file added android/app/src/main/res/drawable/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/drawable/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file removed android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<color name="primary">#FFF</color>
<color name="notification_color">#007AFF</color>
</resources>
2 changes: 2 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:windowBackground">@drawable/background_splash</item>
<item name="android:statusBarColor">@color/primary</item>
</style>

</resources>
19 changes: 12 additions & 7 deletions functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,21 @@ return (exports.sendPushNotification = functions.firestore
.catch(error => console.log(error))

const { contactName, contactPhoto } = data
if (source === "2") {
if (source === "1") {
const payload = {
data: {
conversaId
},
notification: {
title: contactName,
body: contentTranslated,
body: content,
sound: "default",
android_channel_id: "main-channel",
collapseKey: "unichat",
group: "unichat"
priority: "high",
icon: "logo_notification",
android_channel_id: "unichat",
large_icon: "logo_notification",
show_in_foreground: "true",
content_available: "true"
}
}

Expand All @@ -45,8 +48,10 @@ return (exports.sendPushNotification = functions.firestore
.doc(userId)
.get()
.then(doc => {
const { pushToken } = doc.data()
return admin.messaging().sendToDevice(pushToken, payload)
const { pushToken, notifications } = doc.data()
if (notifications)
return admin.messaging().sendToDevice(pushToken, payload)
else return null
})
}
}))
4 changes: 4 additions & 0 deletions jest/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Enzyme from "enzyme"
import Adapter from "enzyme-adapter-react-16"

Enzyme.configure({ adapter: new Adapter() })
Loading