Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
HOTFIX bump version and disallow delete / block for me contact
Browse files Browse the repository at this point in the history
  • Loading branch information
Boehrsi committed May 27, 2020
1 parent 6d5a386 commit 38fc95e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 30 deletions.
65 changes: 36 additions & 29 deletions lib/src/contact/contact_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* for more details.
*/

import 'package:delta_chat_core/delta_chat_core.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
Expand Down Expand Up @@ -142,20 +143,23 @@ class _ContactDetailsState extends State<ContactDetails> with ChatCreateMixin {
iconBackground: CustomTheme.of(context).chatIcon,
onTap: () => createChatFromContact(context, widget.contactId),
),
SettingsItem(
pushesNewScreen: false,
key: Key(keyUserProfileBlockIconSource),
icon: IconSource.block,
text: L10n.get(L.contactBlock),
iconBackground: CustomTheme.of(context).serverSettingsIcon,
onTap: () => showActionDialog(
context,
ProfileActionType.block,
_blockContact,
{
ProfileActionParams.name: state.name,
ProfileActionParams.email: state.email,
},
Visibility(
visible: widget.contactId != Contact.idSelf,
child: SettingsItem(
pushesNewScreen: false,
key: Key(keyUserProfileBlockIconSource),
icon: IconSource.block,
text: L10n.get(L.contactBlock),
iconBackground: CustomTheme.of(context).serverSettingsIcon,
onTap: () => showActionDialog(
context,
ProfileActionType.block,
_blockContact,
{
ProfileActionParams.name: state.name,
ProfileActionParams.email: state.email,
},
),
),
),
ListGroupHeader(
Expand All @@ -171,21 +175,24 @@ class _ContactDetailsState extends State<ContactDetails> with ChatCreateMixin {
ListGroupHeader(
text: "",
),
SettingsItem(
pushesNewScreen: false,
key: Key(keyContactDetailDeleteContactProfileActionIcon),
icon: IconSource.delete,
text: L10n.get(L.contactDelete),
textColor: CustomTheme.of(context).error,
iconBackground: CustomTheme.of(context).blockIcon,
onTap: () => showActionDialog(
context,
ProfileActionType.deleteContact,
_deleteContact,
{
ProfileActionParams.name: state.name,
ProfileActionParams.email: state.email,
},
Visibility(
visible: widget.contactId != Contact.idSelf,
child: SettingsItem(
pushesNewScreen: false,
key: Key(keyContactDetailDeleteContactProfileActionIcon),
icon: IconSource.delete,
text: L10n.get(L.contactDelete),
textColor: CustomTheme.of(context).error,
iconBackground: CustomTheme.of(context).blockIcon,
onTap: () => showActionDialog(
context,
ProfileActionType.deleteContact,
_deleteContact,
{
ProfileActionParams.name: state.name,
ProfileActionParams.email: state.email,
},
),
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ox_coi
description: OX COI Messenger is a mail based chat app.

version: 0.700.1+517 # x.y.z+build-number
version: 0.700.2+518 # x.y.z+build-number

environment:
sdk: ">=2.6.0 <3.0.0"
Expand Down

0 comments on commit 38fc95e

Please sign in to comment.